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
Post a Comment