title: get some elements in Json array
body: <p>I have a json array format</p>
  
  <pre><code>[
    {
      "code": "string",
      "codeB": "string",
      "country": "string",
      "industry": "string",
      "name": "string",
      "nameB": "string"
    }
  ]
  </code></pre>
  
  <p>I would create a new object with only some items:</p>
  
  <pre><code>[
    {
      "code": "string",
      "codeB": "string",
      "name": "string",
      "nameB": "string"
    }
  ]
  </code></pre>
  
  <p>I get data from localStorage then I do a filter on Items that I need</p>
  
  <pre><code>  var allData = JSON.parse(sessionStorage.getItem("groups"));
    var datafiltered = allData.filter(function(el) {
      return el.code &amp;&amp; el.name &amp;&amp; el.codeB &amp;&amp; el.nameB;
    });
    console.log("data filtered", datafiltered);
  </code></pre>
  
  <p>Actually as a result I get empty array</p>