title: Ionic 2 and JSON Data Addition
body: <p>I am working with Ionic 2 Storage to persist form data. I save the data like this:</p>
  
  <pre><code>this.storage.set(key, JSON.stringify(formData));
  </code></pre>
  
  <p>And I retrieve and attempt to update the data like this:</p>
  
  <pre><code>this.getReport(key).then((report) =&gt; {
    var objReport = JSON.parse(report);
    objReport.push(data); //this is the problem
    this.storage.set(pk, JSON.stringify(objReport));
  });
  </code></pre>
  
  <p>getReport is just this:</p>
  
  <pre><code>getReport(key) {
    return this.storage.get(key);
  }
  </code></pre>
  
  <p>So I know that .push is for arrays and not objects, but I don't think its efficient to do all this conversions because I am dealing with large objects.</p>
  
  <p><strong>My question is:</strong> what is the most efficient way to retrieve json from storage and append to it? It makes no sense to me that .parse returns an object if objects do not have a push method like arrays.</p>
  
  <p>Here is the error:</p>
  
  <blockquote>
    <p>Runtime Error Uncaught (in promise): TypeError: Cannot read property
    'push' of undefined TypeError: Cannot read property 'push' of
    undefined</p>
  </blockquote>