Querying in ExtJs Json Store

22 Jul

This deals with queries similar to sql like getting number of records from a json store based on conditions, getting a record etc,

Ex: To get the no of records with title “xxx” from the below json data store,

var dataList = {
    “data”: [{
            “id”: 1,            
            “id”: 2,            

var sampleStore = new{
                id: ‘sampleStore’,


Use this,

sampleStore.query(“title”, “xxx”)).getCount()


To get the record by id,



To get the record at particular index,




Posted by on July 22, 2011 in Ext JS


Tags: , , ,

2 responses to “Querying in ExtJs Json Store

  1. Steve c

    February 8, 2012 at 12:05 am

    doesn’t the query line have an extra bracket?

  2. Creators

    February 15, 2012 at 11:44 am

    which line?


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: