I have some obj like this...
tdata: [
{
name: 'jims',
id: '30616'
},
{
name: 'joms',
id: '38330'
}
]
I want to know how to get any values from this obj
thanks for every answer :)
I have some obj like this...
tdata: [
{
name: 'jims',
id: '30616'
},
{
name: 'joms',
id: '38330'
}
]
I want to know how to get any values from this obj
thanks for every answer :)
Try the following
var tdata= [
{
name: 'jims',
id: '30616'
},
{
name: 'joms',
id: '38330'
}
]
console.log(tdata[0].name);
First, you have to access the object from the array then you can access the properties of that object.