I'm having an observable that passes me a json object on which I'm using the distinct operator. I don't want to have duplicates if the entire object is same as before. I can't just use a one comparator like id, as it's id might be same but it's content not.
So I'm currenty stringifying the object and then using distinct and it works fine
Is there a better way to do this?
someObservable
.startWith(cachedCopy)
.map(item => JSON.stringify(item))
.distinct()
.subscribe(item => {
//I do some stuff!
})