So I've got an array that has thousands of values. The delimiter is the same and the content is all numbers. It's a simple array.
Example..
[491353764,202825540,338196858]
Imagine that is 15000 values. I need to split the array into multiple groups of 100 strings.
I got the first 100 fine using this:
ids = ids.toString();
ids = ids.split(',', 100);
console.log(ids.toString());
I know this is basic stuff, but I couldn't find anything that would allow me to split it multiple times into groups. Am I focusing on the wrong thing thinking some version of split
will do the job? Do I need to put it through a loop?
.slice(0,100)
which will a. return a new array with the first 100 elements and b. remove those 100 from the original array – m90 Feb 17 '12 at 16:59slice
ing the array. – Rocket Hazmat Feb 17 '12 at 17:05