LINQ to JavaScript

Just came across JSLINQ, a LINQ to Objects for JavaScript arrays.  

var myList = [
      {FirstName:"Chris",LastName:"Pearson"},
      {FirstName:"Kate",LastName:"Johnson"},
      {FirstName:"Josh",LastName:"Sutherland"},
      {FirstName:"John",LastName:"Ronald"},
      {FirstName:"Steve",LastName:"Pinkerton"}
    ];
            
var exampleArray = JSLINQ(myList)
      .Where(function(item){ return item.FirstName == "Chris"; })
      .OrderBy(function(item) { return item.FirstName; })
      .Select(function(item){ return item.FirstName; });

So cool!  Must resist doing too much refactoring Wink

blog comments powered by Disqus

Page List

Month List