How to filter data from one array based on another array

Suppose i have 2 array
arr1=["a","b","c","d","e"]
arr2 = [1,3]
Required output arr1 = ["b","d"]

14 thoughts on “How to filter data from one array based on another array”

Leave a Comment