jsonplaceholder icon indicating copy to clipboard operation
jsonplaceholder copied to clipboard

json server using _embed returns an empty array when accessing children

Open Fighteros opened this issue 4 years ago • 0 comments

json server using _embed returns an empty array

my db file

{ "id": 2, "companyName": "Coffee Mockal", "employees": [ { "id": 1, "username": "Moustapha Mohamed", "email": "[email protected]" }, { "id": 2, "username": "Ali Mohamed", "email": "[email protected]" }, { "id": 3, "username": "Mohamed Aymen", "email": "Mohamed [email protected]" }, { "id": 1, "username": "Moustapha Mohamed", "email": "[email protected]" }, { "id": 2, "username": "Ali Mohamed", "email": "[email protected]" }, { "id": 3, "username": "Mohamed Aymen", "email": "Mohamed [email protected]" }, { "id": 1, "username": "Moustapha Mohamed", "email": "[email protected]" }, { "id": 2, "username": "Ali Mohamed", "email": "[email protected]" }, { "id": 3, "username": "Mohamed Aymen", "email": "Mohamed [email protected]" }, { "id": 1, "username": "Moustapha Mohamed", "email": "[email protected]" }, { "id": 2, "username": "Ali Mohamed", "email": "[email protected]" }, { "id": 3, "username": "Mohamed Aymen", "email": "Mohamed [email protected]" } ] }

when i try http://localhost:5000/companies/2?_embed=employees

the server responds with an empty array

Fighteros avatar Sep 10 '21 05:09 Fighteros