I get a List from Java to javascript in AJAX response.
So i have to iterate the List of Beans and display each Bean as a record in the table.
Eg;
[[prop1=value1,prop2=value2],[prop3=value3,prop4=value4],[prop5=value5,prop6=value6]]
After iterating list it must display as follows.
value1 value2
value3 value4
value5 value6
It is having complexity in iterating the list in javascript.
I don’t know how to iterate in javascript..
Any idea or response is highly Appreciated 🙂
Make sure the data are in proper JSON format.
When you can convert it to javascript object. If you are using JQuery you can do,
jQuery.parseJSON( jsonString );Then you can loop it like a normat Javacript array.