I have an array of objects with common properties. For example
[{color:"red",name:"basher"},
{color:"blue", name:"tony"},
{color:"red",name:"bobo"},
{color:"blue",name:"pina"}
]
The desired output is an array of arrays like the following -
[
[{color:"red",name:"basher"},{color:"red",name:"bobo"}],
[{color:"blue",name:"tony"},{color:"blue",name:"pina"}]
]
I've found this question slightly similar question but it splits the array into objects with keys. I dont want the keys. I simply want to split the array of objects into an array of arrays each containing the objects with similar properties.