to_json and attribute order?

hello,

is there a reason why my attributes are not in the order as i declare
them in my hash?
two pasties to see what i mean.

code:
http://pastie.org/pastes/216649

result:
http://pastie.org/pastes/216657

the :id and :value attributes are twisted. but i need them in this
order on the client.
any hints whats going in here?

btw: app is still on 1.2.6. but just tested the same code on 2.1 with
the same result.

thank you

hello,

is there a reason why my attributes are not in the order as i declare
them in my hash?
two pasties to see what i mean.

hashes in ruby are not ordered (at least not in 1.8)

Fred

okay. makes sense to me.
ok, i'll have to find another way.

thx for the information.