I have the following data structure:
[
{ some: thing9,
key: 9,
},
{ some: thing3,
key: 3,
},
{ some: thing2,
key: 2,
},
{ some: thing1,
key: 1,
}
]
How can I sort this array based on the key value of the dictionary so I get:
[
{ some: thing1,
key: 1,
},
{ some: thing2,
key: 2,
},
{ some: thing3,
key: 3,
},
{ some: thing9,
key: 9,
}
]
Thanks