title: Remove json inside an array
body: <p>I've a json string stored in local storage, which could look like this:</p>
  
  <pre><code>{
     "cart":[
        {
           "tuote":{
              "id":"1",
              "name":"Rengas 1",
              "count":"2",
              "price":"8"
           }
        },
        {
           "tuote":{
              "id":"2",
              "name":"Rengas 2",
              "count":"4",
              "price":"8"
           }
        },
        {
           "tuote":{
              "id":"3",
              "name":"Rengas 3",
              "count":"4",
              "price":"8"
           }
        }
     ]
  }
  </code></pre>
  
  <p>So, let's say I want to remove <strong>Rengas 2</strong>, with id <strong>2</strong> (it's the middle one in this case.)</p>
  
  <p>I know, I could use splice and do it like this</p>
  
  <pre><code>myJson.splice(2,1);
  </code></pre>
  
  <p>But what if I have hundreds of items in the array? </p>
  
  <p>And I won't know which one I want to remove (clicking a button in this case would remove the item), how would I do that?</p>
  
  <hr>
  
  <p>So if I want to remove the item that I click on, in this case. </p>
  
  <p><img src="https://i.stack.imgur.com/c7yGP.png" alt="this"></p>