title: How to delete Backbone model from localStorage collection
body: <p>I have created some models all saved in local storage collection. My challenge is how to delete a model fom the collection in local storage using one of the model attributes value. Below is extract of my code:</p>
  
  <pre><code>var Food = Backbone.Model.extend({
      defaults: {
      title: '',
      calories: 0,
      date: '',
      history: false
  }
  });
  
  var Foods = Backbone.Collection.extend({  
      model: Food,
  localStorage: new Backbone.LocalStorage('Health-Tracker')
  });  
  my_foods = new Foods({});
  
  var ls = new Backbone.LocalStorage('Health-Tracker');
  var res = ls.findAll();
  var n = res.length;
  var i, id;
  for (i = 0; i &lt; n; i++) {
      food = res[i];
      id = food['id'];
      title = food['title'];
      calories = food['calories'];
      date = food['date'];        
      history = food['history'];      
      //I am stuck here
      if (history) {      
          ls.remove(food); // Not working
          // I have also tried this
          ls.remove(id); // not working
      }
  }
  </code></pre>
  
  <p>Note that history is set to true successfully for some models in other section of the bigger codes. Above is only where I need to take action if history value is true. And it is bad code for now.
  Any assistance is appreciated</p>