Unfortunately, I don\'t have JQuery or Underscore, just pure javascript (IE9 compatible).
I\'m wanting the equivalent of SelectMany() from LINQ functionality.
try this (with es6):
Array.prototype.SelectMany = function (keyGetter) { return this.map(x=>keyGetter(x)).reduce((a, b) => a.concat(b)); }
example array :
var juices=[ {key:"apple",data:[1,2,3]}, {key:"banana",data:[4,5,6]}, {key:"orange",data:[7,8,9]} ]
using :
juices.SelectMany(x=>x.data)