0

I'm trying to get the properties for the following objects:


0: [object Object]
1: [object Object]
2: [object Object]
3: [object Object]

This was generated by using the following code:

var s = ""; 
for (var property in this.oProducts.Product)
{
   s = s + "\n "+property +": " + this.oProducts.Product[property] ;
}                 
prompt("test",s);

Since object names can't simply be a number ie(this.oProducts.Product.0), how can I access the object properties in the list above?

Thanks

2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by Airshow
0

I would guess that this.oProducts.Product is an array or array-like object (such as a DOM collection) or a regular js object populated with properties named 1,2,3,4.

Airshow

Edited by Airshow: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.