Igor_Bozhinovsk
3 years agoNew Contributor III
How to create new array if there are more than 100 elements in the array
Hi , currently we have an array that contains more then 100 elements , approximately 168. Is it possible with some transformation in the mapper to create another array that will contain the rest 68 elements ?
We would have 1 array with 100 elements and the other should contain the rest of the elments.
Or we can split the array if there are more then 100 documents , that would work too.
vfantidou Please use below expression-. From your example seems there are some typo (2nd record in input0 should have ID not ID_NUMERIC). If it's not typo you need make null safe in mapper.
input0.filter((val,index)=> $filterData.find((ele)=> ele['ID'] ==val['ID'] ) != null )