Does KnockoutJS have a feature whereas I could take something like:
var myArray = ko.observableArray([
{ name: \"Jimmy\", type: \"Friend\" },
Just want to add to this that if you call this .distinct() method twice (like maybe from a computed observable), you'll get the indexes and associated computed function called twice - rinse and repeat and you've got a performance problem on your hands.
To sort this out, add this line near the top of the function:
if (target.index && target.index[prop]) return target; //Group by already set up, bail out.