Skip to content

Instantly share code, notes, and snippets.

@DaveKin
Last active February 19, 2018 09:43
Show Gist options
  • Save DaveKin/e6aaa13b56460b3bab8cc5000f6b5d62 to your computer and use it in GitHub Desktop.
Save DaveKin/e6aaa13b56460b3bab8cc5000f6b5d62 to your computer and use it in GitHub Desktop.
A compound data filter representation in json
{
"operator": "and",
"expressions": [
{
"operator": "and",
"expressions": [
{
"field": "a",
"condition": { ">": 10 }
},
{
"field": "b",
"condition": { ">": 20 }
}
]
},
{
"operator": "or",
"expressions": [
{
"field": "c",
"condition": { "<": 30 }
},
{
"field": "d",
"condition": { "in": [1,2,3] }
}
]
}
]
}
// (a>10 AND b>20) AND (c<30 OR d IN [1,2,3])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment