How do I sort this array?
[
{id : 1, start : 60, end : 120},
{id : 2, start : 100, end : 240},
{id : 3, start : 700, end : 720}
]
UPDATE:
So if my array looks like this, can I sort it based on start value?
[{
1:{start : 60, end : 120},
2:{start : 100, end : 240},
3:{start : 700, end : 720}
}]
What you have there is an array of objects. You must specify how you want to sort it.
Anyway, you can use the
sortmethod: