I have a Javascript object like this:
{
"xx2b": {
"county": "Baringo",
"town": "Kabarnet",
"saccoRegistration": "BO2/08/009",
"saccoName": "Baringo2"
},
"QQDa": {
"saccoRegistration": "Ba/09/009",
"town": "Mogotio",
"county": "Baringo",
"saccoName": "Baringo1"
}
}
I would like to convert it to remove the key for each object and push it to be a property within the objects like this:
{
{
"id": "xx2b",
"county": "Baringo",
"town": "Kabarnet",
"saccoRegistration": "BO2/08/009",
"saccoName": "Baringo2"
},
{
"id": "QQDa",
"saccoRegistration": "Ba/09/009",
"town": "Mogotio",
"county": "Baringo",
"saccoName": "Baringo1"
}
}