title: SAPUI5 adding Data to JSON Model from Local Storage
body: <p>I need to add something from my local Storage to my JSONModel that I can use it in a view.xml.</p>
  
  <p>In my function where I build up the JSON Model I read the data I need from the local storage. </p>
  
  <pre><code>de.fum.nmp.util.Storage.getItem("amountSync").done(function(amountSync) {
      amountSync = JSON.stringify(amountSync);
  }).fail(function() { 
      var i = 0;
  });
  
  de.fum.nmp.util.Storage.getItem("newSyncTime").done(function(sSyncime) {
      aSyncTimes = JSON.stringify(sSyncime);
  }).fail(function(sError) { 
      var i = 0;
  });
  </code></pre>
  
  <p>These two deliver the two data fields I need. After that the JSON Model is build, but that already happened before I implemented the reading from the storage.</p>
  
  <pre><code>var oModel = new sap.ui.model.json.JSONModel(oData);
  this.getView().setModel(oModel);
  </code></pre>
  
  <p>How can I make sure that I add those data to the JSON Model, too?</p>