I am new in Admin on REST.
my response for /users
is like on this:
{
"status": 200,
"response": {
"data": [
{
"id": 298487355,
"login": "000000000053"
},
...
]
}
"error": "text error"
}
how can I set path for response
: data
: [...]
to get list of users?
Thanks
you can customize your restClient. for example I choose to work with
jsonServer
so I have this inapp.js
:customRestClient
actually is this file, I bring it to my source, adjust the imports.this file is the point that your data comes to and goes from your app to your api.
so in the
convertHTTPResponseToREST
function you simply can check forresource
and if it wasusers
you can access the your data byjson.response.data
and return it inswitch
Thanks @pelak a lot. I just write code base on your answer.
In your custom restClient point out path to response data.
Keyword: list in child element, list nest