Skip to content

Instantly share code, notes, and snippets.

@jonathborg
Last active August 26, 2024 16:39
Show Gist options
  • Save jonathborg/52ce2ec7db547a1ab2b771d3ad84e344 to your computer and use it in GitHub Desktop.
Save jonathborg/52ce2ec7db547a1ab2b771d3ad84e344 to your computer and use it in GitHub Desktop.
Filtering Spec

Example payload:

[
  {
    "field": "custom_name",
    "operator": "sw",
    "value": "foo"
  },
  {
    "field": "birth_date",
    "operator": "gt",
    "value": "1990-01-01"
  },
  {
    "field": "some_date",
    "operator": "bt",
    "value": "2024-05-01,2024-06-30"
  },
  {
    "field": "status",
    "operator": "eq",
    "value": "active"
  }
]
Operator Description
eq Equals
ct Contains
gt Greater than
lt Less than
sw Starts With
bt Between
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment