How to - Parse and produce JSON

In many cases it is requested in a workflow to parse JSON content and extract data out of the JSON structure.


For those cases the Collection Manager plugin can be used.


The action configuration, in its normal form, it's straight forward, simply select "Use json" if you want to have the JSON form of a collation as output.


NOTE: in input you will always have the possibility to specify either an Hash or a JSON string. Both are supported.


Collection Manager exposes an input called Source_JSON_collection that accepts a JSON string.


As a result the plugin can convert the JSON to an Hash.


The plugin provides two main features for this case:

  1. Convert a JSON string to an Hash structure. This allows to have the entire JSON content converted to a Ruby Hash element that can then be used later on in the workflow.


  2. Extract a specific element of the JSON content and expose it as a single output



On top the plugin allows you to produce JSON as output by converting an Hash into JSON. This is optional and it will be produced only if the Use JSON option is selected in the configuration.

As an advanced use case, the action can be used to extend a JSON structure by adding other elements.



Powered by Zendesk