In Connect-REST json, how to parse dynamic Key values with spaces in names
We have been trying to map a connect-rest response and we are facing the issues in parsing dynamic keys that we receive in response. The problem is that the key in the JSON both dynamic and it has space in the key.
Example - 1:
{"status": { "aaa 1234": "SUCCESS", "bbb 3456":"FAILED"}}
Example - 2:
{"status": { "def 1234": "SUCCESS", "ghi 3456":"FAILED"}}
The value "aaa 1234" changes for each case depending on the account details of the customer.
When we try to parse the above we observed two things:
Dynamic values can be parsed in Pega using value groups. But the problem is keys for value group cannot contain spaces. Therefore, it fails when we try to pase the above JSON.
Pega allows space in Keys for property names using pzExternalName qualifier but this is only for static values. We cannot use that for dynamic values.
Considering the above observations is there any other way we can parse the JSON.