You can use Object.keys("yourobjectvariable") to get array of object fields.
In your example Object.keys("yourobjectvariable").length will be 2.
---------
Boris Egorov
skype/gtalk/nickname: dolphin278
mobile: +7 905 728 1543On Sat, Jun 16, 2012 at 8:25 PM, vitoa <[email protected]> wrote: > Tanks a lot for the Object sugestion that works great :) > One more question. > How can I list all indexs in this object or the size, are there any > methods? > > for example I have > table > { xxx: [ 'xxx', 'aaa', '123' ], zzz: [ 'zzz', 'aaa', '123333' ] } > > How can I have the length of this table(should be 2) and show all > indexs available > I found that I only can acess the data if I have index name like > table['xxx'] > > Regards, > Vitor > > -- > Job Board: http://jobs.nodejs.org/ > Posting guidelines: > https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines > You received this message because you are subscribed to the Google > Groups "nodejs" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/nodejs?hl=en?hl=en > -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
