Skip to content
Advertisement

I can’t access all the elements in an array inside an object

I have array of objects resultArray:

JavaScript

My object looks like

JavaScript

where n is number of elements inside the diams array.

Assuming

JavaScript

"0","3","5" should be index to access the global array diams it looks like

JavaScript

I am trying to display all the selected information by user from this object. This is my code:

JavaScript

I got this:

JavaScript

but I wanted:

JavaScript

Thats why I tried to access the global array diams like this:

JavaScript

But I got only the first value:

JavaScript

Could you tell me what am I doing wrong?

Advertisement

Answer

JavaScript
JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement