How to parse incoming JSON with Map data structure / object in it.
We have JSON response coming in below format, where under cname details, map object is mapped in JSON. Which means first tag under cnameDetails is always going to be different.
{
cnameId: "someid",
...,
cnameDetails: {
abc123: {
cnameDetailID: abc123,
serialNumbers: [...],
...,
ddd: {
attributeValues: {
...
}
}
},
cnameDetails: {
xyz123: {
cnameDetailID: xyz123,
serialNumbers: [...],
...,
ddd: {
attributeValues: {
...
}
}
}
}
Is there a way in PEGA to parse JSON with map data structure within it? For now, I'm mapping the request to string and doing string search to look for required data but is not the right thing.