The Json Mapper To List action is one of the actions at your disposal to work with Json data. Json Mapper To List enables you to extract a list of values 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.
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 Field: "Output" - Returns a list of values corresponding to the JQuery expression.
How to
The variables need to be adjusted according to your expected result for each process.
Example 1
1. Create a new process and give it a name.
2. Drag the JSon Mapper To List action to the canvas and link it to the other actions.
4. Click the Json Mapper To List action to access its configurations and add the variables created at the previous space.
5. Save, Validate and Run the process.
6. The process will ask for the inputs, we could leave the defaults as is for now.
7. Click Run.
8. Click Check Instance to view the results.
Further queries
We will continue with further examples of queries by only changing the <%Filter%> and showcasing the returned results for the same Json input, below the examples.
ο»Ώ
ο»Ώ
1. Create a new process and give it a name.
2. Drag the JSon Mapper To List action to the canvas and link it to the other actions.
4. Click the Json Mapper To List action to access its configurations and add the variables created at the previous space.
5. Save, Validate and Run the process.
6. The process will ask for the inputs, we could leave the defaults as is for now.
7. Click Run.
8. Click Check Instance to view the results. We will see that all first names from the json were saved in the variable.
ο»Ώ