PROCESIO
OverviewPlatform ActionsIntegrations & DemosMarketplaceCustom ActionsDeveloper’s Guide

Extract Objects

Extracts one value, or a list of values, from a JSON object or array with a JSONPath query.

The Extract Objects action reads a JSON object, a JSON array or a data model and pulls out the values that match a JSONPath query. You get both the first match and the full list of matches, so one action covers "give me this field" and "give me every item that…".

Extract Objects was previously called JSON Mapper. It replaces the older Extract List action, which is being decommissioned: the Result List output gives you the same list.

Add the action

In the Process Designer toolbox, open JSON and pick Extract Objects (or type Extract Objects in the search box).

The Extract Objects action properties: Input JSON, Query, Result and Result List

Inputs and outputs

FieldDirectionTypeRequiredWhat to put / what you get
Input JSONInputJSONYesThe JSON object, JSON array or data model to read. You can type it or use a variable.
QueryInputTextYesA JSONPath expression, for example $.store.book[*].title.
ResultOutputAny typeNoThe first value that matches the query. Empty when nothing matches.
Result ListOutputList of any typeNoEvery value that matches the query. An empty list when nothing matches.

Example

Input JSON:

{
  "store": {
    "book": [
      { "title": "Sapiens", "price": 8.5 },
      { "title": "Dune", "price": 12, "isbn": "0-441" }
    ],
    "bicycle": { "color": "red" }
  }
}
QueryResultResult List
$.store.bicycle.colorred["red"]
$.store.book[*].titleSapiens["Sapiens", "Dune"]
$..book[?(@.price < 10)]{"price": 8.5, "title": "Sapiens"}[{"price": 8.5, "title": "Sapiens"}]
$.store.car (no match)empty[]

With a JSON array as input, for example [{"name":"Eric","amount":122.45},{"name":"Chris","amount":144.99}], the query $..name returns Result Eric and Result List ["Eric", "Chris"].

Good to know

  • Result always holds the first match, even when the query matches several values. Use Result List when you need all of them.
  • A query that matches nothing does not fail the step: Result stays empty and Result List is [].
  • If Input JSON is not a JSON object or array, the step fails with The input is not a valid JSON/JArray.
  • If the query is not valid JSONPath (for example $[[), the step fails with the JSONPath parser's message.
  • Matched values keep their JSON type: a number stays a number and an object stays an object. Map Result to a variable of the type you expect.

On this page