title: Using Rxjs distinct operator to compare whole object with nesting
body: <p>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.</p>
  
  <p>So I'm currenty stringifying the object and then using distinct and it works fine</p>
  
  <p>Is there a better way to do this?</p>
  
  <pre><code>someObservable
    .startWith(cachedCopy)
    .map(item =&gt; JSON.stringify(item))
    .distinct()
    .subscribe(item =&gt; {
        //I do some stuff!
       })
  </code></pre>