Skip to main content

FilterData

filterData used to Search the values from array of object

Sample Code

 import {filterData} from 'vijay-js';

const data = [
{
name: 'user1',
id: 1,
email: 'test1@gmail.com',
},
{
name: 'user2',
id: 2,
email: 'test2@gmail.com',
},
];

const vc = filterData(data, 'user1');
console.log('vc :>> ', vc);

Output

vc :>>  [ { name: 'user1', id: 1, email: 'test1@gmail.com' } ]