I have a ruby (sequel) generating hash with
equipment = Equipment.select(:id, :gl_code, description).order(:description).to_hash(:id)
and I get a properly ordered hash. I also verified that order stays the same when hash is converted to json. However, in ajax receiving json
console.log(res.body.equipment);
shows reordered hash by numeric id key which I don't want because in drop down list I want to show items ordered by description just like ruby sends it.
How to make javascript keep the same order as it gets sent by the server?