I'm not good with array and never have been. So this is probably a simple and stupid question but here goes:
I have an array of objects. Each object looks like this :
obj = {
color: "blue",
name: "Some description",
id: 1
}
Currently it is arranged in the following manner:
[Blue, Blue, Beige, Beige, Cyan, Cyan]
What I need to do is to sort this array based on object's color
property to looks like this:
[Blue, Beige, Cyan, Blue, Beige, Cyan]
Thanks :)