# How do you find the length of an Associative Array?

**URL:** <https://forum.kirupa.com/t/how-do-you-find-the-length-of-an-associative-array/64222>\
**Category:** flash\
**Created:** [September 14, 2004, 9:52am UTC](https://forum.kirupa.com/t/how-do-you-find-the-length-of-an-associative-array/64222 "2004-09-14T09:52:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Carlos](https://avatars.discourse-cdn.com/v4/letter/c/ecae2f/32.png) [@Carlos](https://forum.kirupa.com/u/Carlos)\
**Post date:** [September 14, 2004, 9:52am UTC](https://forum.kirupa.com/t/how-do-you-find-the-length-of-an-associative-array/64222/1 "2004-09-14T09:52:22Z")

</div>

How do you find the length of an Associative Array? The standard “arrayName.length” returns 0.

Cheers,  
c

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 14, 2004, 9:58am UTC](https://forum.kirupa.com/t/how-do-you-find-the-length-of-an-associative-array/64222/2 "2004-09-14T09:58:19Z")

</div>

var len=0;  
for (prop in arrayName) len++;

trace("arrayName length is "+ len);

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 14, 2004, 10:46am UTC](https://forum.kirupa.com/t/how-do-you-find-the-length-of-an-associative-array/64222/3 "2004-09-14T10:46:38Z")

</div>

Thanks mate!
