i got this structure:
{
"parent": {
"child-parent-1": {
"att1": null,
"att2": null,
},
"child-parent-2": {
"att1": null,
"att2": null,
}
}}
What i need to get, is the “child-parent-1” and “child-parent-2” names without knowing their names… since they are dynamically generated, like a hash code (askdl1km2lkaskjdnzkj2138).
Tried iterating but i couldn’t make it work. I always get the child attributes (key/value pair). Or the entire parent object with all the objects in it. Need to get the parent names i’ve mentioned above.
How can I do this?
Thanks in advance.
Iterating the object should work:
For me, this logs: