JSON Parse
Use the JSON Parse action to convert a JSON string into an object.
Complete the following steps to use the JSON Parse action in your workflow:
1. Click and drag the JSON Parse action under JSON Tools to the canvas, place the pointer on the action, and then click or double-click the action. The JSON Parse window opens.
2. Edit the Label, if needed. By default, the label name is the same as the action name.
3. In the Add JSON field, map the JSON string output of a previous action or enter the JSON string to convert into an object.
Click Add to add multiple JSON strings. Click to delete any JSON string that you added.
4. In the Throw Parsing Error field, select true so that the action fails with a parsing error if an invalid JSON is provided. If you select false, the action does not fail even if you provide an invalid JSON.
5. Click Done.
Output schema
The JSON Parse action returns an output schema, as shown in the following figure:
For example, if you set the value of the Add JSON field to {"Name":"John","Age":15,"isEmployed":true,"Address":{"City":"Pune","Country":"India"}}, and execute the workflow, the action returns the following output:
"Name": "John",
"Age": 15,
"isEmployed": true,
{ "City": "Pune", "Country": "India" }
Was this helpful?