Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Filtering JSON Data on the Browser/Client

Tags:

json

Here's the scenario-- you've got a JSON object on the browser, and let's say it has a boolean property, called "Active". We want to create a new JSON object that contains only items that have Active = True. Is there an easy way to do this, other than looping through the entire JSON object?

I'm basically trying to use ASP.Net AJAX Templates to show a list of items that can either be active or inactive, based on a dropdown the user selects.

like image 872
Nicholas Head Avatar asked Oct 17 '08 00:10

Nicholas Head


People also ask

What is JSON filter?

The json filter converts a JavaScript object into a JSON string. This filter can be useful when debugging your applications. The JavaScript object can be any kind of JavaScript object.

How do I get JSON data at the client side?

Receive JSON Data on the Client SideConvert the incoming JSON string to an object using JSON. parse() . Do whatever you wish with the object.

How much JSON can a browser handle?

The maximum length of JSON strings. The default is 2097152 characters, which is equivalent to 4 MB of Unicode string data.


1 Answers

Check out:

  • JSLINQ
  • Steele's Functional
  • Underscore.js
like image 195
Mauricio Scheffer Avatar answered Oct 11 '22 08:10

Mauricio Scheffer