8min

Json Mapper

The Json Mapper action is one of the actions at your disposal to work with Json data. JSON Mapper enables you to extract a value from a JSON or a JSON array.

The action will be able to query/extract data from a JSON input using a JSONPath expression and save it to a variable.

Overview

The action is used to filter the Json data that we will import in our process for future use.

Input Field 1: β€œInput JSON” - Input your JSON object / Array or a data model.

Input Field 2: β€œQuery” - The Input Jquery expression for obtaining the desired key value of your Json input.

Output Field1: β€œResult” ( JSON Object value corresponding to the query)

How toο»Ώο»Ώο»Ώο»Ώ

1. Create a new process and give it a name.

2. Drag the Json mapper action to the canvas and link it to the other actions.

Document image
Document image
  • ο»Ώ<%input%> will contain the JSon data, the default will use
JSON
|
  • ο»Ώ<%filter%> will contain the JQuerry expression that we will use on our data. In this exaplte the <%filter%> will be ..name
  • ο»Ώ<%result%> will be our actions output.

4. Click the Json mapper action to access its configurations and add the variables created at the previous space.

Document image

5. Save, Validate and Run the process.

6. The process will ask for the inputs, w could leave the defaults as is for now.

Document image

7. Click Run.

8. Click Check Instance to view the results. We will se that the first name from the json was saved in the variable. Keep in mind that the action will extract only one value from a JSON or a JSON array.

Document image

ο»Ώ

Updated 27 Apr 2022
Did this page help?
Yes
No