I have an array with contains multiple dictinary objects. Each objects represents a user and contains a name key. I want the object alphabetically sorted in the array by the value of the name key.
Here a visual representation of what I want to end up with:
// We start with this
[
{
name: "foo",
age: "24"
},
{
name: "bar",
age: "56"
}
]
// We end up with this
[
{
name: "bar",
age: "56"
},
{
name: "foo",
age: "24"
}
]