Duaer

Expressions and code

Query JSON with JMESPath in Duaer

In Duaer, query JSON with $jmespath(object, "query"). Expressions and the JavaScript Code node can call it; the Python Code node cannot.

What $jmespath reads in Duaer

The first argument is the object to query, usually $json or one item from an earlier node. The second is a JMESPath string. The query runs on this execution’s data and does not change the original item.

When a dot path is enough, write $json.body.city. Use JMESPath when you need to filter an array or project fields.

{{ $jmespath($json, "body.city") }}

Where you can call it

  • A Duaer expression can call $jmespath().
  • A JavaScript Code node can call it too.
  • The Python Code node has no $jmespath. Read fields with Python dictionaries and lists.

Questions

How many arguments does $jmespath take in Duaer?

In Duaer, two: the JSON to query (usually $json) and a JMESPath string. The query does not change the original item.

Can a Duaer Python Code node call $jmespath?

No. Duaer expressions and the JavaScript Code node can. In Python, read fields with dictionaries and lists.

In this section