I have the below object in javascript.
I need to find;
- The total amount of "prop3" children - in the below example that would be 7.
- Find the first prop3 child, and then iterate over them, until I get to the last one (used in a step-form thingy)
Any ideas?
{
"d399ca811f45": {
"prop1": "d399ca811f45",
"prop2": {},
"prop3": {
"1d2097764d06": {
"header": "value",
"subprop1": "1d2097764d06"
}
}
},
"6d0cb4c7748b": {
"prop1": "6d0cb4c7748b",
"prop3": {
"3a29208f0015": {
"header": "value",
"subprop1": "3a29208f0015"
},
"e8eb0f1b339b": {
"header": "value",
"subprop1": "3a29208f0015"
},
"05d43aaf7ef7": {
"header": "value",
"subprop1": "3a29208f0015"
}
}
},
"39feecfa5498": {
"prop1": "39feecfa5498",
"prop2": {},
"prop3": {
"57a07392b86e": {
"header": "value",
"subprop1": "3a29208f0015"
},
"fd84d411a823": {
"header": "value",
"subprop1": "3a29208f0015"
},
"75ff469329ab": {
"header": "value",
"subprop1": "3a29208f0015"
}
}
}
}