title: how to use filter in ExtJs store?
body: <p>I created a store using ExtJs and i want to load the value of store to ComboBox. But before loading values i need to filter some data based on value selected in another comboBox.</p>
  
  <p>So for that purpose i think i need to apply  filter on store, please any body can help me how i can do that.</p>
  
  <p>Model:-</p>
  
  <pre><code>Ext.define('City', {
  extend: 'Ext.data.Model',
  fields: [
          { name: 'StateId', type: 'string' },
          { name: 'City', type: 'string' },
  ]});
  </code></pre>
  
  <p>Store:-</p>
  
  <pre><code>var cityStore = Ext.create('Ext.data.Store', {
  model: 'City',
  data : [
      { StateId: '1', City: 'Bangalore'},
      { StateId: '1', City: 'Mysore'},
      { StateId: '1', City: 'Dharwad'},
      { StateId: '2', City: 'Mumbai'},
      { StateId: '2', City: 'Pune'},
      { StateId: '2', City: 'Nagpur'}
     ]});
  </code></pre>
  
  <p>Now i am using this <strong>cityStore</strong> to load in Combobox. but before load i want if <strong>stateId is 1</strong> then only 3 records <strong>(Bangalore, Mysore, Dharwad)</strong> are load in combobox and if <strong>stateId is 2</strong> then other 3 records are load in combobox. How i can achive it.</p>