So, i have a problem where my javascript is auto ordering number named arrays.
My object comes from an Ajax call, so i cant build it differently.
Example of my problem:
var test = {"1": "test1", "0": "test2", "2": "test3"}
output
console.log(test);
// {0: "teste2", 1: "teste1", 2: "teste3"}
The order should be 1,0,2...
Any way to solve this?
Btw, this is an example, in the script i am getting an object throw ajax and when i console.log it, it orders automatic, so map() functions wouldn't work here.