const array = [1, 2, 4]
const collection = [{ type: 1, eyes: 'blue'},{ type: 2, eyes: 'brown'}, { type: 3, eyes: 'green'}, { type: 4, eyes: 'blue'}]
const joinByType = R.innerJoin(
(o, type) => o.type === type
)
const result = joinByType(collection, array)
Created
February 13, 2019 22:28
-
-
Save cezarneaga/8b5fddd0eb2386e066490b13e031dd57 to your computer and use it in GitHub Desktop.
filter array by array
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment