json-server
json-server copied to clipboard
or logic in filtering
In my db I have something like this:
[
{
"id": "89be578a-ef59-4cf2-96ca-5911bf95d959",
"count": 1
},
{
"id": "464e2921-2a44-4bfb-b533-89f2a75f8ba5",
"count": 5
},
{
"id": "111837ad-7b91-4fd3-b7c8-daa7b194e8fa",
"count": 6
},
{
"id": "111837ad-7b91-4fd3-b7c8-daa7b194e8fa",
"count": 8
},
{
"id": "111837ad-7b91-4fd3-b7c8-daa7b194e8fa",
"count": 10
}
]
And I would like to request like this
/connections?count=1&count_gte=8
and get items with count 1,8 and 10.
Currently it seems that json-server applies some kind of "and" logic and this request become mutually exclusive. As a result I get empty array
Proposal allow "or" request