How can I filter a get request to a json-server with specific search queries?

Viewed 7875

I have installed a Json-Server. Get-Requests to this server are delivering the expected data but now I want to add some search queries to my request. But the result is still the same. I don't know whats my mistake here.

Here is my request: http://localhost:3000/people?age=22

I also tried it with: http://localhost:3000/people?customer.age=22 but the result is still all data.

Thats my JSON-File:

 {
  "customer": [
    {
      "id": 1,
      "name": "Stefan Winkler",
      "phone_number": "017692601589",
      "age": "22",
      "education": "High School"
    },
    {
      "id": 2,
      "name": "Christoph Huber",
      "phone_number": "094462649",
      "age": "42",
      "education": "nothing"
    },
    {
      "id": 3,
      "name": "Michael Unholer",
      "phone_number": "093862649",
      "age": "12",
      "education": "Realschule"
    }
  ]
}
1 Answers
Related