JSON
Extract Object
6 min
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 https //kb procesio com/regex replace#qd 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 3\ add the needed variables <%input%> <%input%> will contain the json data, the default will use \[ { "name" "eric", "invoicenumber" "inv99901", "duedate" "2021 08 30t07 00 00 000z", "amount" 122 45, "phonenumber" "0700000000", "emailaddress" "employee\@procesio com" }, { "name" "chris", "invoicenumber" "inv99902", "duedate" "2021 08 03t07 00 00 000z", "amount" 144 99, "phonenumber" "0711111111", "emailaddress" "otheremployee\@procesio com" }, { "name" "diana", "invoicenumber" "inv99903", "duedate" "2021 08 30t07 00 00 000z", "amount" 99 99, "phonenumber" "0722222222", "emailaddress" "employee\@procesio com" } ] <%filter%> <%filter%> will contain the jquerry expression that we will use on our data in this exaplte the <%filter%> <%filter%> will be name <%result%> <%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 5\ save , validate and run the process 6\ the process will ask for the inputs, w could leave the defaults as is for now 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