Skip to main content Svelte Highlight v7.21.1

JMESPath language preview

1. Filter and project

a filter expression, a multi-select hash, and a pipe
horizon-dark
people[?age > `30`].{name: name, city: address.city} | sort_by(@, &name)
atom-one-dark
people[?age > `30`].{name: name, city: address.city} | sort_by(@, &name)
github-dark
people[?age > `30`].{name: name, city: address.city} | sort_by(@, &name)
dracula
people[?age > `30`].{name: name, city: address.city} | sort_by(@, &name)
nord
people[?age > `30`].{name: name, city: address.city} | sort_by(@, &name)
github
people[?age > `30`].{name: name, city: address.city} | sort_by(@, &name)

2. String literals and quoted identifiers

a raw string, a backtick JSON literal, and a quoted field
horizon-dark
people[?"first name" == 'Ada'] | length(@)
atom-one-dark
people[?"first name" == 'Ada'] | length(@)
github-dark
people[?"first name" == 'Ada'] | length(@)
dracula
people[?"first name" == 'Ada'] | length(@)
nord
people[?"first name" == 'Ada'] | length(@)
github
people[?"first name" == 'Ada'] | length(@)

3. Built-in functions

sort_by, max_by, and to_array
horizon-dark
max_by(reservations[].instances[], &launch_time) | to_array(@)
atom-one-dark
max_by(reservations[].instances[], &launch_time) | to_array(@)
github-dark
max_by(reservations[].instances[], &launch_time) | to_array(@)
dracula
max_by(reservations[].instances[], &launch_time) | to_array(@)
nord
max_by(reservations[].instances[], &launch_time) | to_array(@)
github
max_by(reservations[].instances[], &launch_time) | to_array(@)