How to get value from a JSON string

If you wish to parse JSON string to make an object, you can do it easily using the Node.JS action or the JSON parse action. 

There are several actions in workflow that provides output in JSON format (e.g. Node.JS). If you wish to use the values of specific keys from this JSON string in the input field of another action, you can do it easily by using the method given below.

Let’s say you export an object (given below) in Node.JS action:


 { "name" :  "Hans", "hobbies" : ["coding", "hacking"] }

You now want to use the value of the ‘name’ key in the input field of another action. To do this, you need to simply enter {{$}} in the input field (assuming that the ID of the Node.JS action is $a1).

Under the ‘hobbies’ key, there are two values. If you want to fetch the second value, use 

{{$a1.output.hobbies[1]}} in the input field.