I need to confirm whether the items in the array below:
const payment1: Payment = new Payment('1000'); // 1000 = id
const payment2: Payment = new Payment('1001');
const paymentArray: Payment[];
paymentArray.push(payment1, payment2);
are present in my observable array:
payments$: Observable<Payment[]>;
What I want is a boolean value (non-observable) as a result.
I have attempted using filter pipe and map but have not been successful:
this.paymentArray.forEach(element => {
this.payments$.pipe(map(payments => payments.filter(payment => payment.id === element['id'])));
});