linq.Aggregate

Collects all the elements in the arrays contained and returns them as a single linquified array

Overloads

  • Array Aggregate ()
  • Array Aggregate (selector)

Array Aggregate ()

Collects all the elements in the arrays contained and returns them as a single linquified array

Example

var myArray = [[true, false], [5]];
//Returns [true, false, 5]
myArray.Aggregate();

Array Aggregate (selector)

Collects all the elements in the arrays from the property specified by the selector and returns them as a single linquified array

Example

var myArray = [{x:[1,3,5]}, {x:["Chicken"]}];
//Returns [1,3,5,"Chicken"]
myArray.Aggregate("o=>o.x");

Last edited Sep 24, 2011 at 5:25 AM by mlorbetske, version 7

Comments

No comments yet.