I would like to filter an array of objects if one of the keys contains so string. given the data:
const data = [
{id: 1, value: 'abs', x: 'ee'}
{id: 2, value: 'ws', x: '21'},
{id: 3, value: 'asd', x: 'as'},
{id: 4, value: 'x', x: 'ee'},
]
I want to be able given the sting or number to filter this array if some value contains the given input
if i get w
i want to be able to get only the second element
if i get a
i want to be able to get the first and third element and so on.
thanks ahead