Bug Tracker

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#10277 closed bug (invalid)

Not the same result between FF and IE/Chrome

Reported by: [email protected] Owned by:
Priority: low Milestone: 1.7
Component: core Version: 1.6.4rc1
Keywords: Cc:
Blocked by: Blocking:


Let say you have this kind of JSON file :


And you use this code in jQuery to fill your select element named "debugSelect":

$.getJSON("data.json", function(data){
  $.each(data, function(key, value) { options += "<option value='"+key+"'>"+value+"</option>"; });

Expected Result : 10010

FF Show : 10010

IE/Chrome show : 5519

I spent 2 days to find this. I suppose that IE Ajax part sort the JSON result. IMHO it may be better to use the sorting order given by the JSON file.


Change History (2)

comment:1 Changed 11 years ago by Rick Waldron

Resolution: invalid
Status: newclosed

JavaScript objects have no order, if you need to maintain an order, use an array

Last edited 11 years ago by Rick Waldron (previous) (diff)

comment:2 Changed 11 years ago by Rick Waldron

Component: unfiledcore
Milestone: None1.7
Priority: undecidedlow
Note: See TracTickets for help on using tickets.