Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

json server using _embed returns an empty array when accessing children #176

Open
Fighteros opened this issue Sep 10, 2021 · 0 comments
Open

Comments

@Fighteros
Copy link

json server using _embed returns an empty array

my db file

{
"id": 2,
"companyName": "Coffee Mockal",
"employees": [
{
"id": 1,
"username": "Moustapha Mohamed",
"email": "moustapha11@fakedata.json.server"
},
{
"id": 2,
"username": "Ali Mohamed",
"email": "Ali@fakedata.json.server"
},
{
"id": 3,
"username": "Mohamed Aymen",
"email": "Mohamed Aymen@fakedata.json.server"
},
{
"id": 1,
"username": "Moustapha Mohamed",
"email": "moustapha11@fakedata.json.server"
},
{
"id": 2,
"username": "Ali Mohamed",
"email": "Ali@fakedata.json.server"
},
{
"id": 3,
"username": "Mohamed Aymen",
"email": "Mohamed Aymen@fakedata.json.server"
},
{
"id": 1,
"username": "Moustapha Mohamed",
"email": "moustapha11@fakedata.json.server"
},
{
"id": 2,
"username": "Ali Mohamed",
"email": "Ali@fakedata.json.server"
},
{
"id": 3,
"username": "Mohamed Aymen",
"email": "Mohamed Aymen@fakedata.json.server"
},
{
"id": 1,
"username": "Moustapha Mohamed",
"email": "moustapha11@fakedata.json.server"
},
{
"id": 2,
"username": "Ali Mohamed",
"email": "Ali@fakedata.json.server"
},
{
"id": 3,
"username": "Mohamed Aymen",
"email": "Mohamed Aymen@fakedata.json.server"
}
]
}

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

the server responds with an empty array

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant