I'm trying to reformat my JSON to work with an external API
My current JSON Structure:
{
"serviceConfigs": {
"servicecode": "SC1",
"specifiers": {
"Brand ID": {
"text": {
"value": "test",
"type": "text"
}
},
"Program ID": {
"text": {
"value": "test",
"type": "text"
}
}
}
}
}
Desired Output:
{
"serviceConfigs": [{
"servicecode": "SC1",
"specifiers": {
"Brand ID": {
"text": {
"value": "test",
"type": "text"
}
},
"Program ID": {
"text": {
"value": "test",
"type": "text"
}
}
}
}]
}
So currently serviceConfigs is in an Object, but I want it into an array
My current thought process is to use a push command, but I'm not sure how to access the object (Loop?).