QISMATADocumentationProductOpen Studio
USER GUIDE

Filter with predicates

Describe what to inspect, how to compare it, and which value to compare against.

Read a predicate #

json
{
  "path": "",
  "op": "gt",
  "value": 0
}

Read this as: the current array item is greater than zero.

FieldMeaning
pathThe field within one item. An empty string means the item itself.
opThe comparison operation. gt means greater than.
valueThe expected value or comparison threshold. Here, the number 0.

Use the same rule in different blocks #

Connect an array to array and configure the predicate object. For [-5, 0, 10, 25] and the rule above:

BlockQuestionResult
FilterWhich items match?[10, 25]
AnyDoes at least one item match?true
AllDoes every item match?false
Count WhereHow many items match?2

Filter returns whole matching items in their original order. Add Sort afterwards when you also need ordering.

Try a predicate #

json
{
  "path": "amount",
  "op": "gt",
  "value": 100
}

With [{"name":"A","amount":50},{"name":"B","amount":150}], Filter returns [{"name":"B","amount":150}]. It keeps the entire object, not only amount.

Choose the field path #

pathReads
""The item itself.
"amount"The amount field.
"customer.age"age inside customer.
"items.0.price"price in the first element of a nested items array.

Paths are relative to one array item. Do not prepend inputs or the name of the outer array. Array indices start at zero. Dot-separated paths are supported; items[0].price, wildcards, and JSONPath expressions are not.

Continue with operators, groups, and edge cases.

Qismata documentation