A nested query filter that filters data from a specific format table based on an unlimited depth query in JSON format.
Below is a component that generates a query based on the UI hierarchy
-
Every field are expected be string
-
Integer, float, and date fields are normalized to compare properly
-
It uses Cerberus for data validation and query format validation Cerberus
{
"AND": [
{
"operator": "btw",
"field": "payment_date",
"value": [
"2024-06-02",
"2024-07-15"
]
},
{
"operator": "eq",
"field": "posted",
"value": [
"1"
]
},
{
"OR": [
{
"operator": "lt",
"field": "number",
"value": [
"200"
]
},
{
"operator": "sw",
"field": "accounts",
"value": [
"0011"
]
}
]
}
]
}