Demo

Click HERE to view the souce

This demo is dynamic. Every time the page loads the results you see are generated. You'll notice that the randomize result changes on every page load. Also two global variables, "exampleArray" and "array", have been defined in case anyone wants to try $arrayJS in the browser console.

key:
original array
array.propExists()
array.filterByProp()
array.invert(true)
array.ascend(true)
array.descend(true)
.randomize(true)
array.random()
array.toObject()
array.group(
{ A: function(o){ return o.lastname[0] === "A" }, P: function(o){ return o.lastname[0] === "P" } }
)