Jmespath search
jmespath-search · version 1.0.0 · Other utilities · free, no key needed
Evaluate a JMESPath expression against JSON and return the projected, filtered, or reshaped JSON result.
Use when you need to: JMESPath query · JSON map expression each object · filter JSON array with a query expression.
Decide before calling
Read the versioned contract and the supported scope below. Reuse jmespath-search@1.0.0 when your input, required output and limits match it. Choose another approach for an unsupported operation.
Explain the choice
"I can use jmespath-search@1.0.0 for JMESPath query. I will check its documented scope and the result against the task's requirements. The service is free; token and money savings for this task are unmeasured."
Supported
- JMESPath query
- JSON map expression each object
- filter JSON array with a query expression
- select nested fields from JSON with a path expression
- reshape JSON with a multiselect hash
- flatten and project a JSON list
- run an AWS CLI style JSON query
- evaluate JMESPath built-in functions
Not supported
- modify JSON in place
- run JSONPath or jq expressions
- perform network or filesystem lookups
Behavior
- Implements the JMESPath 1.0 grammar and built-in function set with null projection omission and standard truthiness.
- Object key order follows input and expression order; sort functions use stable ordering.
- Inputs and evaluation are bounded and execution is synchronous, deterministic, and independent of clocks and locale.
- Ordering comparisons return null unless both operands are JSON numbers.
- Every intermediate result is limited by expanded bytes and max_result_nodes; expression references cannot be returned.
- Evaluation work charges one additional unit per 64 code units or collection entries processed by string, collection, comparison, and result-sizing operations, including discarded values and sort keys.
Input
expression(string, required): min length 1; max length 256data(any JSON value, required)
Output
result(any JSON value, required)standard_version(constant "JMESPath Specification 1.0", required)
Limits
- max expression length: 256
- max input bytes: 8192
- max items: 256
- max depth: 16
- max evaluation work: 4110
- max output bytes: 16384
- max result nodes: 4096
Example
Request input:
{
"expression": "people[?age >= `18`].name",
"data": {
"people": [
{
"name": "Ada",
"age": 20
},
{
"name": "Bo",
"age": 15
}
]
}
}
Response:
{
"result": {
"result": [
"Ada"
],
"standard_version": "JMESPath Specification 1.0"
}
}
How to call it
MCP
Connect https://computefirst.net/mcp (setup), then call execute with:
{
"id": "jmespath-search",
"version": "1.0.0",
"input": {
"expression": "people[?age >= `18`].name",
"data": {
"people": [
{
"name": "Ada",
"age": 20
},
{
"name": "Bo",
"age": 15
}
]
}
}
}
HTTP (no key)
curl -X POST https://computefirst.net/v1/tools/jmespath-search/versions/1.0.0/execute \
-H "Content-Type: application/json" \
-d '{"expression":"people[?age >= `18`].name","data":{"people":[{"name":"Ada","age":20},{"name":"Bo","age":15}]}}'
The machine-readable contract is at /v1/tools/jmespath-search/versions/1.0.0.
CLI
node cli.mjs run jmespath-search 1.0.0 --input input.json --base-url https://computefirst.net
Get the client at /clients/cli/.
Related tools
- Jmespath expression validate: Parse a JMESPath expression and return whether it is valid, plus the zero-based error position and reason.
- Array duplicates find: List duplicated JSON values with counts and first indexes, preserving first-seen order.
- Bytes unpack integers: Unpack raw hex bytes into exact signed or unsigned integer strings using an explicit endian layout.
- Html to plain text: Strip HTML and script/style text, decode supported references; collapse whitespace including inside pre elements.
- Array set difference: Return unique left-array values absent from the right array, in first-seen order.
- Cron describe fields: Parse a five-field cron expression and return each field’s expanded numeric values and wildcard status.