
Copy link to clipboard
Copied
I have two arrays: array1 and array2.
I have a function that is iterating through array1. If an item in the array matches a particular condition, then that item is pushed onto array2. I can successfully push up to 19 items onto array2. However, if I attempt to push any additional item on top of the 19 items already in the array, then that push fails. Can I not have more than 19 items in an array? Is there any way to increase the size of the array?
1 Correct answer
If you are seeing only 20 array elements in the Data Browser it does not mean that the array is limited to 20 elements*. You are perhaps seeing a display restriction in the data browser. Have you checked the actual number of elements in your final array by testing its length property?
You can change the number of elements displayed in the Data Browser in the ExtendScript Toolkit Preferences on the Debugging page.
*Note that there are 20 items shown as the first one has an idex of 0.
Ian
Copy link to clipboard
Copied
If you are seeing only 20 array elements in the Data Browser it does not mean that the array is limited to 20 elements*. You are perhaps seeing a display restriction in the data browser. Have you checked the actual number of elements in your final array by testing its length property?
You can change the number of elements displayed in the Data Browser in the ExtendScript Toolkit Preferences on the Debugging page.
*Note that there are 20 items shown as the first one has an idex of 0.
Ian

Copy link to clipboard
Copied
[headdesk] I feel silly. Yep, you got it. I was tearing my hair out over this. Thanks for the tip. I wonder why the limit is so low. Is parsing an array greater than 20 elements in the data browser really consuming that many resources?

