Javascript get Object property value -


this question has answer here:

how property value of name of object's 2nd child?

var obj = {     'one_child': {         name: 'a',         date: '10'     },     'two_child': {         name: 'b',         date: '20'     } } 

i've tried object.keys(obj)[1].name, doesnt work.

you define object properties, can access directly using :

obj.two_child.name 

Comments

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

python - build a suggestions list using fuzzywuzzy -