Suppose I have two arrays. The first one looks like this:
names: [{
value: 'recordedData',
desc: 'Data'
} {
value: 'recordedNumbers',
desc: 'numbers'
} {
value: 'recordedNames',
desc: 'names'
}]
And the second array is as follows:
displayed: [{
value: 'data',
desc: 'Data'
} {
value: 'numbers',
desc: 'numbers'
}]
I aim to filter the first array using the criteria from the second array, resulting in:
DisplayedNames: [{
value: 'recordedData',
desc: 'Data'
} {
value: 'recordedNumbers',
desc: 'numbers'
}]