Skip to content

A nested query filter that filters data from a specific format table based on an unlimited depth query in Json format.

Notifications You must be signed in to change notification settings

Derleyvolt/nested-query-filter

Repository files navigation

nested-query-filter

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 image

  • 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

Example of a valid Query:

{
    "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"
                    ]
                }
            ]
        }
    ]
}

About

A nested query filter that filters data from a specific format table based on an unlimited depth query in Json format.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages