Architect - recovery json from data action

Hello.

Refering to this post:

I can not accomplished what is proposed. I need to get raw json from data action to architect and i can not find the way.

Some help?

below screnshots with contract and configuration section of the data action.

tnx

Hello Daniel,

I managed to do it by passing a string value
I wanted the first result:

  • in the data action, the response is set as $.data[0]
  • in the flow, I am converting the string into a json object by JsonParse(Task.firstMatchStr)

In you case, you can set the rawResult into a string output and convert it to json in the flow.

With kind regards,

Erik

I use the following to get the object as a string, and then in Architect I can convert it to a JSON Object again

Response template

{
"translationMap": {},
"translationMapDefaults": {},
"successTemplate": "{"jsonObject": "$esc.jsonString("${rawResult}")" }"
}

Still not working, even putting the data you said :face_with_peeking_eye:

any idea? what i´m doing wrong?

Not formatted correctly.

You need to wrap response in double quotes and escape them in the response box to form valid json response.

"successTemplate": " { \"jsonObject\": \"$esc.jsonString(${rawResult}\" } "

I recently did same to get raw data from gc api as still not option for nested arrays in data actions.

Onto the next stage trying to work out the architect json functions with the none real world appalling example usage.

I will try, thanks Simon!

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.