I need assistance with extracting child objects from an array in Angular7. The array currently has a top level that I want to remove, leaving only the objects with properties. Any guidance on how to achieve this would be greatly appreciated.
{
"toplevel": [
{
"SetName": "name1",
"description": "blah blah blah",
"managingEntitySource": "blah blah blah",
"effectiveDate": "01/01/9999",
"terminationDate": "01/01/9999",
"systemEffectiveDate": "01/01/9999",
"systemTerminationDate": "01/01/9999",
"comments": "blah blah blah",
"lastProcessDate": "01/01/9999"
},
{
"SetName": "name2",
"description": "blah blah blah",
"managingEntitySource": "blah blah blah",
"effectiveDate": "01/01/9999",
"terminationDate": "01/01/9999",
"systemEffectiveDate": "01/01/9999",
"systemTerminationDate": "01/01/9999",
"comments": "blah blah blah",
"lastProcessDate": "01/01/9999"
}
]
}
The desired output should look like this:
[
{
"SetName": "name1",
"description": "blah blah blah",
"managingEntitySource": "blah blah blah",
"effectiveDate": "01/01/9999",
"terminationDate": "01/01/9999",
"systemEffectiveDate": "01/01/9999",
"systemTerminationDate": "01/01/9999",
"comments": "blah blah blah",
"lastProcessDate": "01/01/9999"
},
{
"SetName": "name2",
"description": "blah blah blah",
"managingEntitySource": "blah blah blah",
"effectiveDate": "01/01/9999",
"terminationDate": "01/01/9999",
"systemEffectiveDate": "01/01/9999",
"systemTerminationDate": "01/01/9999",
"comments": "blah blah blah",
"lastProcessDate": "01/01/9999"
}
]