cancel
Showing results for 
Search instead for 
Did you mean: 

How to loop through each record of Odata service dataset in SAPUI5

chhavisehgal
Discoverer
0 Kudos

I have an Odata service with one dataset. I want to fetch all record and loop through each row which contains 5 column, to form a customized string in SAPUI5.

How can i fetch each row in a loop from model. Kindly help.

Accepted Solutions (0)

Answers (2)

Answers (2)

Sharathmg
Active Contributor

Get var yourData = oData.getData() -> list of objects or rows of data.

For loop through the yourData array and get each row.

You can also use .forEach() function and then operate on each row/object in the variable.

Regards,

Sharath

former_member227918
Active Contributor
0 Kudos

take data from model (oModel.getData()), and do for loop, or use $.map(oData, function(obj, index) { })

any issue you are getting ?