Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the leading LINQ for JavaScript library? [closed]

I'm looking for a JavaScript library that will allow me to query complex JSON objects using a LINQ-like syntax. A quick search found a couple of promising options that look they might offer what I need:

LINQ to JavaScript and jLinq

  • Does any one have any experience using them?
  • What are some pros and cons?
  • Is the performance comparable?
  • Does the function-passing syntax of LINQ to JavaScript offer any hidden benefits (I personally find the syntax of jLinq more appealing on first glance)?
  • What have you found lacking in either project?
  • Did you ever try contacting the authors? How responsive were they?
  • What project is more widely used?

I think it will be the first one to get a thorough try-out.

like image 762
Tom Tresansky Avatar asked Mar 19 '10 14:03

Tom Tresansky


People also ask

Does Javascript have LINQ?

LINQ in Javascript is a great simple tool for manipulating data collections in javascript. You can easily transform, sort, select and combine data collections using javascript commands in react, angular, etc.

Can we use LINQ in JQuery?

By using the JQuery function grep and prototype, it's possible to extend Array class and simulate basic LINQ functions. As shown above in the sample, all functions have the same format.

What is LINQ stackoverflow?

Ask Question. Language Integrated Query (LINQ) is a Microsoft .NET Framework component that adds native data querying capabilities to .NET languages.


1 Answers

You might want to check out linq.js. It follows the .NET lambda syntax and looks to be well integrated in a Microsoft environment.

LINQ for JavaScript - http://linqjs.codeplex.com/

Pros

  • Implements all .NET 4.0 methods
  • Complete lazy evaluation
  • Full IntelliSense support for VisualStudio
  • Supports jQuery
  • Supports Windows Script Host
  • Binding for Reactive Extensions for JavaScript(RxJS) and IntelliSense Generator
  • NuGet install support
  • Updated recently (last release Jan 2011)
  • Syntax conforms to lambda syntax in C#

Cons

  • The linq.js library is a little large.
  • If you are already using jQuery or other js library, the most commonly used functionality is probably already available. See especially jQuery's filter, and 'Any' methods.
like image 142
Nathan Palmer Avatar answered Sep 30 '22 12:09

Nathan Palmer