The "filters" parameter

Using the filters parameter

The filters parameter, which is very similar to the more commonly used q parameter described in filtering, can be used to target only those data rows that meet specific conditions. The main difference is that it's formatted in JavaScript Object Notation (JSON).

Filter Expression Syntax

The root element of the JSON structure specified in the filter expression (the filters parameter) is a list ( []), containing 1 or more attribute objects. The boolean logic (AND/OR) to apply can be specified per attribute object, but note that the attribute objects themselves are always ANDed. An attribute object ( {}) has the following properties:
  • name: the name of the row attribute
  • logic: the boolean logic to apply to the list of attribute conditions (and/or)
  • conditions: the list ([]) of attribute conditions. Each attribute condition object ({}) has the following properties:
    • operator: the comparison operator, one of <, >, <=, >=, =, !=, ILIKE (contains), NOT ILIKE (does not contain), START (starts with), NOT START (does not start with), END (ends with), NOT END (does not end with).
    • value: the value the attribute will be compared to using the operator
For example, to filter rows by an attribute called "ajaxErrors" having a value between 1 and 10:
[
    {
        "name":       "ajaxErrors",
        "logic":      "and",
        "conditions": [ {"operator": ">=", "value": "0"}, {"operator":"<=","value":"10"} ]
    }
]