json-server icon indicating copy to clipboard operation
json-server copied to clipboard

Search on multiple collection?

Open kimthangatm opened this issue 2 years ago • 1 comments

Can we search on multiple collection.

Example: /db?q=...... or Example: /db?title=A&otherField=c

{
  "collectionA": [
    {
      "title": "A"
    },
    {
      "title": "B"
    }
  ],
  "collectionB": [
    {
      "name": "name A"
    },
    {
      "name": "name B"
    }
  ]
}

kimthangatm avatar May 22 '22 06:05 kimthangatm

If there is a relationship between the tables then https://github.com/typicode/json-server#relationships otherwise each collection is a separate table

bu3alwa avatar May 25 '22 20:05 bu3alwa