I want to access this.props.userList and populate it in List component, anyone know how?
here's the screenshot of the props.userList
I want to access this.props.userList and populate it in List component, anyone know how?
here's the screenshot of the props.userList
What about obj.ul[0].firstName
and obj.ul[0].id
?
the object you have has one key named ul
inside that there is an array ,
the items inside the array have the key firstname
:
you access it with o.ul[0].firstName
or if you want to loop:
for (i=0; i<o.ul.length; i++)
o.ul[i].id;