Articles on: Administration

Configure Flow: JSON parser

Configure Flow: JSON parser


To use JSON values within the flow, you can use the JSON parser to specify your own variables that are searched for and stored in the JSON payload passed.

Each variable is given a user-defined name and the path in your JSON payload.


Use only ASCII characters for the variable name.

In addition, you can specify whether a variable is mandatory. If this is then not found in the JSON payload, the flow terminates with a corresponding error message and does not execute any further functions.




The following syntax is used for the required JSON path, which is illustrated in the following example payload.


Example Payload:


`{

"name": {"first": "Tom", "last": "Anderson"},

"age": 37,

"children": ["Sara","Alex","Jack"],

"fav.movie": "Deer Hunter",

{"friends": [

{"first": "Dale", "last": "Murphy", "age": 44, "nets": ["ig", "fb", "tw"]},

{"first": "Roger", "last": "Craig", "age": 68, "nets": ["fb", "tw"]},

{"first": "Jane", "last": "Murphy", "age": 47, "nets": ["ig", "tw"]}

]

}`



Syntax

Result

name.last

Anderson

age

37

children

["Sarah","Alex","Jack"]

children.#

3

children.0

Sarah

child*.1

Alex

c?ildren.2

Jack

fav\.movie

DeerHunter

friends.#.first

["Dale","Roger","Jane"]

friends.1.last

Craig




Further possibilities for processing and filtering via the JSON path can be found in this documentation.




Updated on: 28/02/2023

Was this article helpful?

Share your feedback

Cancel

Thank you!