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

Question: Is it possible to have a nested field? #8

Open
withchandra opened this issue Jun 1, 2022 · 4 comments
Open

Question: Is it possible to have a nested field? #8

withchandra opened this issue Jun 1, 2022 · 4 comments

Comments

@withchandra
Copy link

Hello, sorry if it is not the right place to ask,
is it possible to have a nested field for the mockend response API?

[
    {
        "user": "Tony",
        "contact": {
            "phone": "012345678",
            "email": "[email protected]"
    }
]

Thank you

@withchandra withchandra changed the title Question: Is it possible to have a nested field Question: Is it possible to have a nested field? Jun 1, 2022
@lokesh1987-hack
Copy link

``[
{
"user": "Tony",
"contact": {
"phone": "012345678",
"email": "[email protected]"
}
}
]

@lokesh1987-hack
Copy link

YES, IT IS POSSIBLE

@withchandra
Copy link
Author

YES, IT IS POSSIBLE

Could you give an example how to do it in mockend,json?
Thank you in advance.

@sravanth-space
Copy link

Hi @withchandra, try the below.

{ "Post": { "comments": { "hasMany": "Comment" } }, "Comment": { "post": { "belongsTo": "Post" } } }

refer

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

3 participants