title: React Native - Return all JSON data in AsyncStorage?
body: <p>In my React Native app's AsyncStorage, I have multiple JSON objects, each with a unique key id like so:</p>
  
  <pre><code> '62834456':
   data: { "foo": "bar",
   "nicknames": [ "grizz", "example" ],
   ... and so on }
  </code></pre>
  
  <p>They have been pushed into AsyncStorage stringified. I'm trying to retrieve every object by their id, and push both the id and its' JSON data into the component's state. I have this so far:</p>
  
  <pre><code>// for every key in async storage, push to favorites in state
  importData = (id) =&gt; {
    for (id in AsyncStorage) {
      return AsyncStorage.getItem(id)
        .then(req =&gt; JSON.parse(req))
        .then(json =&gt; console.log(json))
        .catch(error =&gt; console.log('error!'));
    }
  }
  </code></pre>
  
  <p>When console.logging 'json' in the above function, the result is null. How can I properly access all JSON objects in my AsyncStorage?</p>
  
  <p><strong>FINAL EDIT</strong></p>
  
  <p>Using your code example and removing JSON.parse (so simply console.logging req) returns this:
  <a href="https://i.stack.imgur.com/mcf7d.png" rel="noreferrer"><img src="https://i.stack.imgur.com/mcf7d.png" alt="enter image description here"></a></p>
  
  <p>It appears this is happening because for some reason .forEach is returning the first string in the array, the array itself, then the second string. </p>