Following is my JSON format,
{
"records": [
{
"ID": "4",
"TYPE": "landscape",
"FIMAGE": "viewveni.jpg",
"COUNT": "4444"
}
],
"pagination": {
"count": 1,
"page": 1,
"limit": 10,
"totalpages": 1
}
}
I am trying really hard to fetch the Second element
of First element
, i.e. records.TYPE
, but i can not use the index name TYPE
.
I know records[0][1]
won't work and i am really out of options now.
Edit:
I know I can fetch data as records[0].TYPE but I can't use TYPE as plain text, how ever if it's a variable then it's ok, ie. Something like records[0].cat
where cat = 'TYPE'