Skip to content

jmespath

Written as jmespath(argnum flags):options in a transform expression.

Minimum arguments 1
Maximum arguments no limit
Default arguments 1
Argument modes SINGLE_PRIMITIVE, SINGLE_ARRAY, SINGLE_DICT, MULTIPLE_ARRAYS, MULTIPLE_DICTS

Extract data from JSON or converting JSON data using JMESPath queries with flexible input handling.

Features:

  • Supports standard JMESPath syntax (https://jmespath.org/)
  • Automatically handles both JSON strings and parsed JSON objects
  • Flexible input handling based on argument count (can be disabled with ‘d’ flag)

Behavior by default (without ‘d’ flag):

  • With 1 argument: Uses that single argument as the JSON input
  • With multiple arguments: Uses the list of arguments as the JSON input

Use the ‘d’ flag to always treat input as a list of arguments regardless of count.

Flag Letter
spread_input s
spread_output S
noncaptive_input I
arg_num_flexible f
no_arg_discriminate d
Input args: [{"user":{"name":"Alice","age":30}}]
Transforms: "jmespath:user.name"
Output: "Alice"
Input args: ["Alice",30]
Transforms: "jmespath:[0]"
Output: "Alice"
Input args: [{"name":"Alice"}]
Transforms: "jmespath(d):@"
Output: [{"name":"Alice"}]
Input args: [{"users":[{"name":"Alice"},{"name":"Bob"}]}]
Transforms: "jmespath:users[*].name"
Output: ["Alice","Bob"]