It would be nice if we could get a function which would allow us to filter a source array and return the result as a new array.
Example:
Array: [bananas, apples, cucumbers. 12340]
I need to being able to filter:
1) All array items which contain something
2) All array items which start with a string
3) All array items which end with a string
4) All array items where length > 0
+ similar rules with NOT operator.
I can imagine filtering the array items with regexes.
Currently, we need to iterate through array, then aggregate the results into a new array... This sounds like way to many steps and one handy array filter function would be quite beneficial.
Created by Tereza Klobouckova
·