Re: [jQuery] javascript object not array?

2007-03-09 Thread transfire
On Mar 9, 1:34 pm, Francesco Sullo <[EMAIL PROTECTED]> wrote: > d is an Object > d.Products is an Array > > You could test you objects using the "constructor" property. If you try: > > alert (d.constructor) > > you could see that it shows a result different from > > alert(d.Products.constructor)

Re: [jQuery] javascript object not array?

2007-03-09 Thread Francesco Sullo
d is an Object d.Products is an Array You could test you objects using the "constructor" property. If you try: alert (d.constructor) you could see that it shows a result different from alert(d.Products.constructor) --Francesco [EMAIL PROTECTED] ha scritto: I'm confused. Why does: var

[jQuery] javascript object not array?

2007-03-09 Thread transfire
I'm confused. Why does: var d = { "Products": [ "Books", "Electronics" ] }; alert(typeof d["Products"]); Report "object" and not "array"? How am I supposed to tell if I have an array rather than a "map" object? Thanks, T. ___