I have such two arrays of objects:
const first = [{text: 'sometext1', applicable: true}, {text: 'sometext2', applicable: false}, {text: 'sometext3', applicable: true}];
const second = [{text: 'sometext1', applicable: true}, {text: 'sometext2', applicable: true}];
As a result I want to get such array:
const result = [{text: 'sometext1', applicable: true}, {text: 'sometext2', applicable: true}, {text: 'sometext3', applicable: true}];
so => just add to second array all non-existing items from first array, filtered by 'text' key.
is it possible to do via reducers? or maybe any better way?
