Quantcast
Channel: SCN: Message List - SAPUI5 Developer Center
Viewing all articles
Browse latest Browse all 8124

Re: how to do with json model

$
0
0

Hi Shen,

 

In order to append the existing JSON data with current JSON data

 

 

      // create some dummy JSON data        var oldData = {            actionName: "Say Hello"        };                // create a Model and assign it to the View        var oModel = new sap.ui.model.json.JSONModel();        oModel.setData(oldData);     var newData = {          "newItem" :  "something"      }     oModel.setData(oModel.getData().newItem); // Append the new item on the json model

 

 

Regards,

Ajain


Viewing all articles
Browse latest Browse all 8124

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>