How do i order this object by the keys, Alphabetically?
I tried:
racks.sort();
The object racks is filled like this:
(Statdev is a string, and kartnr and bitnrk are integers)
racks[jPunten[i].STATDEV] = {
label: '',
punkt: [{
x: jPunten[i].KARTNR,
y: jPunten[i].BITNRK}]
Some Firebug output (i also noticed that in firebug the object IS ordered alphabetically):
racks
[]
DAY
Object { punkt=[8], label=""}
label
""
punkt
[Object { x="12", y="1"}, Object { x="12", y="2"}, Object { x="12", y="3"}, 5 meer...]
0
Object { x="12", y="1"}
1
Object { x="12", y="2"}
2
Object { x="12", y="3"}
3
Object { x="12", y="4"}
4
Object { x="12", y="5"}
5
Object { x="12", y="6"}
6
Object { x="12", y="7"}
7
Object { x="12", y="8"}
LSF01
Object { punkt=[1], label=""}
label
""
punkt
[Object { x="1", y="10"}]
0
Object { x="1", y="10"}
x
"1"
y
"10"