I want to do an AJAX on a select-dropdown and the api returns this object, is it too messy? I have read that sometimes it has to come organized by the server, I do not know if this is allowed.
how can I show phone numbers ?
return {
results: data.data, <<<<<<--------- something like this?
pagination: {
more: (params.page * 30) < data.total_count
},
THE JSON:
{
count_page: 1,
data: [
{id: 123, phone_number: "+15065556233"},
{id: 321, phone_number: "+13849243299"},
{id: 341, phone_number: "+19868769532"},
]
}