function updateObject(object, newValue, path){
var stack = path.split('>');
while(stack.length>1){
object = object[stack.shift()];
}
object[stack.shift()] = newValue;
}
More Related Contents:
- “Uncaught SyntaxError: Unexpected token , ” when create my object javascript
- Test for existence of nested JavaScript object key
- Weird behavior with objects & console.log [duplicate]
- How to get the difference between two arrays of objects in JavaScript
- How to get a key in a JavaScript object by its value?
- How to create an object property from a variable value in JavaScript? [duplicate]
- Why can I add named properties to an array as if it were an object?
- How to get the size of a JavaScript object?
- How to access the first property of a Javascript object?
- Object property name as number
- String to object in JS
- How to get objects value if its name contains dots?
- How to get object length [duplicate]
- Relative Paths in Javascript in an external file
- How to iterate (keys, values) in JavaScript? [duplicate]
- How to display image with JavaScript?
- Convert JavaScript array of 2 element arrays into object key value pairs
- JavaScript equivalent of jQuery’s extend method
- Convert relative path to absolute using JavaScript
- Count duplicates within an Array of Objects
- JavaScript, elegant way to check nested object properties for null/undefined [duplicate]
- What is the type of “keys” in JavaScript?
- Why does (“foo” === new String(“foo”)) evaluate to false in JavaScript?
- Find all values by specific key in a deep nested object
- Javascript oddness with array of objects and indexOf
- Filter nested array in object array by array of values
- how to use javascript Object.defineProperty
- Return an object key only if value is true
- How to merge duplicates in an array of objects and sum a specific property? [duplicate]
- What’s the best way (most efficient) to turn all the keys of an object to lower case?