I get this JSON from my server. But to work with this JSON i need to Add Square Brackets to the MH Object. How can i do that. I tried .map but i dont get it to work for me. Is there any better solution. Or is .mapto use there. If yes can you show me a hint how to do that. Or is there a better solution?
{
"PAD": [
{
"PADPS286": "Dampf",
"PADPS124": "Hans",
"PADPS60": "2018-05-01",
"PADPS143": "1",
"MH": {
"MHVSS1": [
{}
],
"MHDIRW214": 2017,
"MHDIRW215": 2018,
"birthdate": "2018-05-01",
"MHDIRW129 ": "0"
}
},
{
"PADPS286": "Snow",
"PADPS124": "Jon",
"PADPS60": "2077-05-01",
"PADPS143": "",
"MH": {
"MHVSS1": [
{}
],
"MHDIRW214": 4,
"MHDIRW215": 4,
"birthdate": "2077-05-01",
"MHDIRW129 ": "0"
}
}
]
}
I need this JSON with sqare Brackets arround teh MH Object
{
"PAD": [
{
"PADPS286": "Dampf",
"PADPS124": "Hans",
"PADPS60": "2018-05-01",
"PADPS143": "1",
"MH": [{
"MHVSS1": [
{}
],
"MHDIRW214": 2017,
"MHDIRW215": 2018,
"birthdate": "2018-05-01",
"MHDIRW129 ": "0"
}]
},
{
"PADPS286": "Snow",
"PADPS124": "Jon",
"PADPS60": "2077-05-01",
"PADPS143": "",
"MH": [{
"MHVSS1": [
{}
],
"MHDIRW214": 4,
"MHDIRW215": 4,
"birthdate": "2077-05-01",
"MHDIRW129 ": "0"
}
]}
]
}