on 11-09-2016 4:13 PM
I am programming in sapui5 (Eclipse neon) and would like to know how I could iterate over a Json structure.
The source data for the chart are in a Json File. In my case, I
should first group the desired information and add them. Then I could
insert them into the chart. How can I do this? How do I handle (create
and manipulate) a json object in sapui5?
Attached I send the json file.
There are couple of websites available to check the JSON format like :- https://jsonformatter.curiousconcept.com/ .
These are helpful to understand where is error.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As per attached JSON Model have missing ] }(ending).
Iteration code like
var acountsJson = sap.ui.getCore().getModel("acountsModel").getProperty("/");for(var i =0; i < acountsJson.length; i++){var obj = acountsJson[i];
console.log(acountsJson[i].id);}
Better to check this Sap UI5 with Local JSON Model
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.