Subj : Re: Iterating through all Array elements from C To : netscape.public.mozilla.jseng From : Matthew Mondor Date : Thu Feb 10 2005 02:32 pm On Thu, 10 Feb 2005 12:17:35 -0500 Matthew Mondor wrote: > There seems to be useful API functions to iterate through all elements > of various structures from C (at least in the public API): Meant "there seems to be missing" After some testing, I now was able to make it work for non-contiguous index arrays as well as ones for which push is used. However this involves iterating from 0 upto the number reported by JS_GetArrayLength(), which seems to include all void entries, so I have to skip entries using JSVAL_IS_VOID(). This would seem unefficient for worse case scenario of a large array with sparsely populated IDs, however... As for association arrays my method still fails so far. Will verify if I could perhaps consider them properties and attempt to iterate through properties of the supplied object. Thanks, Matt .