hello I want to iterate an array of objects and render them in a table.
I’m pretty new to this so im struggling to iterate over each inner object.
Any help appreciated.
Here is my array of objects:
I can get a length of the whole array but not the length of each object(final Product).
Would I iterate over the whole array and then another loop for each object inside? How do i get the length of this object inside the array and should i use a for loop or for each loop?
many thanks.
var output = [finalProduct { DeviceName="gkorosi-lt2", Product="Photoshop CC", Status="Active"},
finalProduct { DeviceName="gkorosi-lt3", Product="Illustrator CC", Status="Active"}];
2
Answers
Thanks. I had to keep my original data structure and using these For loops, I managed to get it to work.
If you whant to use JQuery, you can use
$.each
function