Data Transform
Filter array by predicate API
Filters an array of objects with a Mongo-style predicate ($eq,$ne,$gt,$gte,$lt,$lte,$in,$nin,$contains,$regex,$exists) and reports matched/total. Answers 'Which records match these conditions?', 'How do I query an array with a JSON predicate?'.
Price$0.02per request
MethodPOST
Route/v1/data-transform/filter-by
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
data-transformfilterpredicatequeryarrayjson-logicwrangle
API URL
Integration docshttps://x402.hexl.dev/v1/data-transform/filter-byExample request
{
"data": [
{
"n": 1
},
{
"n": 5
},
{
"n": 9
}
],
"where": {
"n": {
"$gte": 5
}
}
}Example response
{
"result": [
{
"n": 5
},
{
"n": 9
}
],
"matched": 2,
"total": 3
}Input schema
{
"type": "object",
"required": [
"data",
"where"
],
"properties": {
"data": {
"type": "array",
"examples": [
[
{
"n": 1
},
{
"n": 5
},
{
"n": 9
}
]
]
},
"where": {
"type": "object",
"examples": [
{
"n": {
"$gte": 5
}
}
]
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}