Skip to content

Tag: underscore.js

Updating nested object by path in javascript

Let’s say I have this object: I’d like to be able to update the price in this object through a function call as follows: This answer Javascript: how to dynamically create nested objects using object names given by an array is good but does not address the case when there are arrays in the object. Underscore acceptable. Note: this answer