Stop json data getting sorted in chrome

1.5k views Asked by At

I have been facing the problem with feature of Chrome. Just came to know after debugging.

An ajax call is made to get data from the server (which has been ordered from the server). But the problem is chrome is sorting the response JSON object. The below object has been taken from ajax response. But just sorts the object based on the key.

I don't have problem with IE or Firefox

{
    "83":"4",
    "65":"AV",
    "64":"AV HY",
    "59":"CAM",
    "10":"CAM Y H",
    "56":"CO",
    "18":"FJ CR"
}

After sorting the object looks like this

{
    "10":"CAM Y H",
    "18":"FJ CR",
    "56":"CO",
    "59":"CAM",
    "83":"4",
    "64":"AV HY",
    "65":"AV"
}

How can I fix this?

1

There are 1 answers

0
Gopi On

I have done the sorting in the client side using array sort. Thanks for the input Rink