Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to prepare key in object dyamically javascript

function resolve(path, obj) {
    return path.split('.').reduce(function(prev, curr) {
        return prev ? prev[curr] : null
    }, obj || self)
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #prepare #key #object #dyamically #javascript
ADD COMMENT
Topic
Name
2+3 =