title: How to get value from localstorage react
body: <p>I add data to localStorage like this:</p>
  
  <pre><code> function handleSave(event) {
      let r = Math.random().toString(36).substring(7);
      const productInfo = {
        name: name,
        ean: ean,
        type: type,
        weight: weight,
        color: color,
        active: active,
      };
      // const productInfo2 = [name, ean, type, weight, color, active];
      localStorage.setItem(r, JSON.stringify(productInfo));
    }
  </code></pre>
  
  <p>I get localStorage mapped like this:</p>
  
  <pre><code>{Object.entries(localStorage).map(([key, value]) =&gt; {
  
          return (
            &lt;div style={style.gridItemsContainer}&gt;
              &lt;p&gt;{value}&lt;/p&gt;
              &lt;p&gt;{value.name}&lt;/p&gt;
              &lt;p&gt;{value.name}&lt;/p&gt;
              &lt;p&gt;{value.name}&lt;/p&gt;
              &lt;p&gt;{value.name}&lt;/p&gt;
              &lt;input checked={value.active} type="checkbox"&gt;&lt;/input&gt;
              &lt;Link to={'/products/' + key}&gt;VIEW&lt;/Link&gt;
              &lt;Link to={'/products/' + key + '/edit'}&gt;EDIT&lt;/Link&gt;
              &lt;button&gt;DELETE&lt;/button&gt;
            &lt;/div&gt;
          );
        })}
  </code></pre>
  
  <p>In first paragraph i get this : </p>
  
  <pre><code>{"name":"kede","ean":"12","type":"baldas","weight":"20","color":"ruda","active":""}
  </code></pre>
  
  <p>Other <code>&lt;p&gt;</code> elements are empty
  How I need to edit my code so I could get values by keys like in example value.name</p>