nahid / jsonq

A PHP query builder for JSON
Creative Commons Zero v1.0 Universal
870 stars 105 forks source link

Allow grouping by a column that has a value of "0" #64

Open oscar-ol opened 1 year ago

oscar-ol commented 1 year ago

Having this data:

[
    {
        "name": "testA",
        "code": "0"
    },
    {
        "name": "testB",
        "code": "0"
    },
    {
        "name": "testC",
        "code": "1"
    }
]

When grouping by code, the items with code '0' were not returned because the if statement evaluated them as false.