Skip to main content
Version: Next

Get From Json 4

Enables to extract the values from json by four paths

Description

Extracts the object or primitive from json by four paths.

The path is specified in dotted form. To extract an element inside an array, the property needs to be included inside brackets, e.g. '[name]'.

Examples

GetFromJSON({ "a": { "b": "hello"}}, 'a.b') -> "hello"
GetFromJSON({ "a": [ { "b": "hello", "c": "boo 1" }, { "b": "coucou" , "c": "boo 2" }] } , 'a.[b]') -> ["hello","coucou"]
GetFromJSON({ "a": [ { "b": { "c": "boo 1" } }, { "b": { "c": "boo 2" } } ] } , 'a.[b].c') -> ["boo 1","boo 2"]

Full doc of the syntax supported: <a href="https://www.npmjs.com/package/jsonpath-plus" target="_blank">jsonpath-plus</a>.

A list will be returned having multiple results found.

If the path was not found the result of the related output would be null. If one of the paths was not found the Error Flow would be triggered.

Inputs

  • Source (Object): The JSON object or string to find from
  • Path1 (String): The property path
  • Path4 (String): The property path
  • Path2 (String): The property path
  • Path3 (String): The property path

Outputs

  • Value3 (Object): The object or primitive found by Path3
  • Value1 (Object): The object or primitive found by Path1
  • Value4 (Object): The object or primitive found by Path4
  • Error Flow (Error Flow)
  • Value2 (Object): The object or primitive found by Path2