How do i find the name of the 1st element? in some of the json structures I need to read through, I do not know the "xyz" or "name0", or "name1" name. I can be anything. Is there a way to get a array of names? If not, I only need to know the name of the first element, all others are known to me. So a get_first_name would work.
How do i find the name of the 1st element? in some of the json structures I need to read through, I do not know the "xyz" or "name0", or "name1" name. I can be anything. Is there a way to get a array of names? If not, I only need to know the name of the first element, all others are known to me. So a get_first_name would work.
{ "xyz" : {
"abc" : [1,2,3,] }
}
Or:
{ "name0" : {
"abc" : [1,2,3,] }
}
Or:
{ "name1" : {
"abc" : [1,2,3,] }
}
thanks!
You could add a method to the json object type.
Something like this: