I have this fixed array:
x = [
{value: 0, text: "hello world"},
{value: 1, text: "how are you?"},
{value: 2, text: "no problem"}
{value: 3, text: "anything else?"}
{value: 4, text: "other dummy text"}
]
and another dynamic array:
y = [2, 4]
I would like to filter the array "x" based on the values from array "y"
the expected result should be:
x = [
{value: 2, text: "no problem"},
{value: 4, text: "other dummy text"}
]
How could I do this?
Thanks