Question
Accenture GmbH
DE
Last activity: 5 Oct 2018 1:55 EDT
JSON Object Parsing in Pega
Pega recieving the response through connect-Rest in the JSON object format as shown below.
{"125-XXX-ABC":
{"cust":"xxx","emailAddress":" Proprietary information hidden","Valid":true,"Others":[{"type":"XXX","value":"125-SDF-RTZ "}]},
"350-YYY-YXF":
{"cust":"yyy","emailAddress":" Proprietary information hidden","Valid":true,"Others":[{"type":"XXX","value":"125-SDF-RTZ "}]}
Connector wizard created the datamodel specific to IDs: "125-XXX-ABC" and "350-YYY-YXF" and not working when response contains other customer Ids.
Instead of mapping reponse data to JSON: Response_Post , I mapped it to clipboard string property and passing JSON string to a function @pxconvertstringtopage after manipulating JSON string Ids (Append alphabet and convert hypen(-) to underscore ( _ ) to "P125_XXX_ABC" and "P350_YYY_YXF" . In clipboard pageless classes are created with different pagenames.
I m unable to copy the classless pages to named pages due to different page names created. Is there a better way to handle this scenario. Any suggestions are helpful.
***Updated by moderator: Lochan to update platform capability***