Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Function Overview

jpx provides 400+ functions organized into 31 categories.

Discovering Functions

List All Functions

jpx --list-functions

List by Category

jpx --list-category string
jpx --list-category math
jpx --list-category datetime

Get Function Details

jpx --describe upper

Categories

CategoryDescriptionCount
ArrayFunctions for working with arrays: chunking, filtering, tran…27
ColorColor manipulation and conversion functions.8
ComputingComputing-related utility functions.9
Date/TimeFunctions for working with dates and times: parsing, formatt…26
DurationFunctions for working with time durations.5
EncodingEncoding and decoding functions: Base64, hex, URL encoding, …8
ExpressionHigher-order functions that work with JMESPath expressions a…33
FormatData formatting functions for numbers, currencies, and other…6
FuzzyFuzzy matching and string similarity functions.9
GeolocationGeolocation functions: distance calculation, coordinate pars…4
HashCryptographic hash functions: MD5, SHA family, and other has…9
ID GenerationFunctions for generating various types of unique identifiers…3
JSON PatchJSON Patch (RFC 6902) functions: applying patches, generatin…3
LanguageNatural language processing functions.5
MathMathematical and statistical functions: arithmetic, rounding…35
Multi-MatchFunctions for matching multiple patterns or expressions in a…10
NetworkNetwork-related functions: IP addresses, CIDR notation, and …7
ObjectFunctions for working with JSON objects: merging, filtering …48
PathFile path manipulation functions.4
PhoneticPhonetic encoding functions for sound-based string matching.9
RandomFunctions for generating random values: numbers, strings, an…3
Regular ExpressionRegular expression functions: matching, replacing, splitting…3
Semantic VersioningSemantic versioning functions: parsing, comparing, and manip…7
Standard JMESPathThese are the standard JMESPath functions as defined in the …26
StringFunctions for string manipulation: case conversion, splittin…36
TextText analysis and processing functions.11
TypeType conversion and checking functions.13
URLFunctions for parsing and manipulating URLs and their compon…3
UtilityGeneral utility functions that don’t fit other categories.11
UUIDFunctions for generating and working with UUIDs.1
ValidationFunctions for validating data: email, URL, UUID, and format …13

Function Syntax

Functions are called with parentheses:

function_name(arg1, arg2, ...)

Examples

# No arguments
echo '{}' | jpx 'now()'

# One argument
echo '{"name": "hello"}' | jpx 'upper(name)'

# Multiple arguments
echo '{"text": "hello world"}' | jpx 'split(text, ` `)'

# Literal arguments (use backticks)
echo '{}' | jpx 'range(`1`, `10`)'

Standard vs Extension Functions

Standard Functions (26)

These are part of the JMESPath specification and work in all implementations:

abs, avg, ceil, contains, ends_with, floor, join, keys, length, map, max, max_by, merge, min, min_by, not_null, reverse, sort, sort_by, starts_with, sum, to_array, to_number, to_string, type, values

Extension Functions (369)

These are jpx-specific and won’t work in other JMESPath implementations.

Strict Mode

Use --strict to disable extension functions:

# This works
jpx --strict 'length(items)' -f data.json

# This fails (upper is an extension)
jpx --strict 'upper(name)' -f data.json