-2
I have an array with some ids, the return object of my request to Webservice is as shown in code snippet number 1.
I wanted to know if you have any way via jQuery, to extract only the values and leave my JSON as shows the object of the second snippet of code:
How are you:
[{ "id": "1" }, { "id": "2" }, { "id": "3" }, { "id": "4" }, { "id": "5" }]
How I wish you were:
["1","2","3","4","5"]
It is necessary to first transform the string into an object, using for example JSON.parse() and then vc can go through the array and get the ids.
– Silas Humberto Souza
But it is already in JSON format, I made the request to the web service via angular and it returns me using echo json_encode($reply)
– Gabriel Becher