title: How to modify data in a local JSON file IONIC 2
body: <p>I am making an app in what I have a JSON file. Each object in the Json file has atribbutes and one of them is "Favorite" which can be either true or false depending on the user choice.
  However, I tried to implement the following code so when the user click favorite, that item will have its parameter changed from false to true in order to be able to list only the favorite items later.</p>
  
  <pre><code>setFavorite(item) {
  
  if (item.favorito == false) {
    this.storage.set('item.favorito','true').then(() =&gt; {
      console.log("Adicionado!");
    });
  }
  
  
  else{
    console.log("Já é Favorito!");
  }}}
  </code></pre>
  
  <p>However, it is not modifying the parameter inside the json file.
  How can I do this?</p>