Last active
February 19, 2018 09:43
-
-
Save DaveKin/e6aaa13b56460b3bab8cc5000f6b5d62 to your computer and use it in GitHub Desktop.
A compound data filter representation in json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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