After ajax, my return from php is:
[{"1":"4"},{"2":"3"},{"3":"7"}]
Data is variable in quantity and content.
I need to treat it with javascript and convert it into an array, in this format:
var retorno = [
[1, 4],
[2, 3],
[3, 7]
];
I'm trying:
var parsed = JSON.parse(response);
var arr = [];
for(var x in parsed){
arr.push(parsed[x]);
}
alert(arr);
response
is the variable with return data
But the result of the alert is: [object Object],[object Object],[object Object]