I have a payload which is coming as a binary output. I need to convert this in array format.
"{\n \"numberRecordsFailed\": 0,
\n \"numberRecordsProcessed\": 0,
\n \"stateMessage\": null,
\n \"systemModstamp\": \"2020-10-05T03:27:28\",
\n \"apiActiveProcessingTime\": 0,
\n \"jobId\": \"7501q000005RsosAAC\",
\n \"apexProcessingTime\": 0,
\n \"createdDate\": \"2020-10-05T03:27:28\",
\n \"id\": \"7511q000005TAMFAA4\",
\n \"state\": \"Queued\",
\n \"totalProcessingTime\": 0\n
}"
how to convert this binary payload to array...can anyone help me with this please
below is my dw2.0 expression to extract id and state
payload map {
CLIENT_ORDER_HEADER_ID: $.payload.id,
STATUS: $.payload.state
}
I assume you get the data as a Java String. Replace
data
withpayload
in the expression below and you can give it a try:Note, the sample data you provided is not an array but an object. No need to use
map
.