No such thing as a small change | |
PerlMonks |
Re: Preserve the order in JSONby roboticus (Chancellor) |
on Jun 16, 2015 at 20:33 UTC ( [id://1130705]=note: print w/replies, xml ) | Need Help?? |
Inside a dictionary/hash, there's no meaning to the order of the keys. That's what it means to be unordered. If you want to maintain order, I'd suggest switching to an array. Arrays will maintain the order. ...roboticus When your only tool is a hammer, all problems look like your thumb.
In Section
Seekers of Perl Wisdom
|
|