Question: Suppose that I've a store containing following model structure:

```
Ext.define('MyApp.model.FavoriteScreen', {
extend: 'Ext.data.Model',

config: {
    fields: [
        {
            name: 'Id',
            type: 'int'
        },
        {
            name: 'Key1'
        },
        {
            name: 'Key2'
        },
        {
            name: 'Key3'
        },
        {
            name: 'Key4'
        }
    ]
}

```

});

Now to find the value from store according to key1, I've written following line of code:

```
var favoritStore = Ext.data.StoreManager.lookup('FavoriteStore'),
index = favoritStore.find('Key1',key_value),
filterValue = index != -1 ? favoritStore.getAt(index) : null;

```

Its working fine. But I want to get value from store on the basis of two keys (i.e key1 & key2)
But I don’t have idea how to do this. Please give me appropriate solution.

Answer: 
You can try this code...

```
var filterValue = null;
favoritStore.each(function(record){
      if(record.get('Key1') == 'yourValue1' && record.get('Key2') == 'yourValue2') {
         filterValue = record;
      }
});

```
If you use the filter functionality of the store you can filter by your multiple keys, then iterate over the filtered store using .each()

```
store.filter([
    {property: "key1", value: "value1"},
    {property: "key2", value: "value2"}
]);

```

Check it out in the docs:
<http://docs.sencha.com/touch/2.3.0/#!/api/Ext.data.Store-method-filter>