Search code examples
json-server

How can I exclude several individual values in json-server query


Using _ne operator, I can exclude a specific value.

GET /posts?id_ne=1

How can I exclude two or more individual values? I tried to chain the arguments as follows but it doesn't work.

GET /posts?id_ne=1&id_ne=5

Solution

  • A fix for multiple _ne operators has been added to json-server on 2. September 2019

    see https://github.com/typicode/json-server/pull/1013