javascript associative array length using jquery

Posted by Prashant on Stack Overflow See other posts from Stack Overflow or by Prashant
Published on 2010-03-08T15:01:46Z Indexed on 2010/03/08 15:06 UTC
Read the original article Hit count: 347

Filed under:

Hello All I am using javascript associative array like:

var testarray = [];
testarray['one'] = '1';
testarray['two'] = '2';
testarray['three'] = '3';

I am also using jquery alongside. How can I check length of this associative array using jquery or any other method? Basically i want to check whether this array is empty or not.

Thank you.

© Stack Overflow or respective owner

Related posts about JavaScript