Table of Contents
This project is simple javascript code for deep searching i.e., when input (array or object) is nested then it search for all the elements that matches the keyword and returns filtered data.
This is basic js code can be implemented in frontend or backend.
Install NPM packages
npm i deep-level-backlog-filters
1- import 'deep-level-backlog-filters'
import deepSearching from 'deep-level-backlog-filters';
2- Input
Attribute | Description |
---|---|
data | array in which we have to perform searching |
filterData | search string example {workItem: 'US-', searchingKeyword: '', unScored: true, epicId:10, teamId: 20, status: 'to-do'} |
Replacements | |
{ |
|
workItem: 'externalKey', |
|
owner: 'userId', |
|
status: 'progress', |
|
} |
let filteredData = deepSearching({workItem: 'US-'}, nestedArray, replacements);
import deepSearching from 'deep-level-backlog-filters';
filteredData = deepSearching( {
workItem: 'US-',
searchingKeyword: '',
unScored: true,
epicId:10,
teamId: 20,
status: 'to-do'
}, data, {
workItem: 'externalKey',
owner: 'userId',
status: 'progress'
});