Hi Buda,
you can't rely on browser internal way to store JSON. Each as its own
way.
The only thing you can do is to call a sort() function but in that
case you'll also loose original order.**
One thing I can propose is to modify data to have an numerical index
to your data so calling a sort() function will give you the original
order.
Your data could look like that:
{
"Data":
{
"1":{"ABC": "6"},
"2":{"NUI": "1"},
"3":{"ITM": "10"}
.....
}
}
--
david
On 20 août, 13:28, buda <[email protected]> wrote:
> I have a problem:
> from server I receive such JSON string (resp.responseJSON.Data)
>
> {
> "Data":
> {
> "ABC": "6",
> "NUI": "1",
> "ITM": "10"
> .....
> }
>
> }
>
> where elements in Data have the apropriate order
> When I do $H(responseJSON.Data) - I have hash object with different
> order of elements
> But I need to have the original order of elements!
>
> What should I do and how can I get it?
> Help me please
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---