javascript update nested object property. You will see how many doc