JSON

Extract Object

6min
Document image
ο»Ώ
ο»Ώ

Extract Object was previously called Json Mapper.

ο»Ώ

The Extract Object action is one of the actions at your disposal to work with Json data. Extract Object 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.

You can use this website to test your JPath queries.

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 Extract Object 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 Extract Object 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 16 Feb 2024
Doc contributor
Doc contributor
Doc contributor
Did this page help you?