I have an array that holds objects, each containing two properties where one is an observable value.
let myArray = [{def: 'name1', value: EventEmitter_}, {def: 'name2', value: EventEmitter_}]
My goal is to subscribe to the observables and return the root object in which the change occurred.
Currently, I am only able to get the specific value.
myArray.forEach(item => {
item.value.subscribe(val => console.log(val))
})
I attempted using merge
merge(myArray).subscribe((value) => {
console.log(value)
})
However, this approach does not work if the observable is nested within another object.