title: Why is json data used among different components synchronised?
body: <p>I'm working on building an angular application. From what i have observed, if i pass the same json data to different components using an observable, changing the json in one component is reflected in the other components as well. I have found a work around for this, by stringfying and parsing data in any component, the sync is broken. But i still don't understand why the json is in sync among all the components it is passed to.</p>
  
  <p>EDIT: </p>
  
  <p>So I have two components <code>CapabilityTreeComponent</code> and <code>FDCTreeViewComponent</code>.</p>
  
  <p>Basically they contain d3 tree diagrams.
  Initially both components use the same json data to build the d3 tree. That is, same data is passed through different observables.</p>
  
  <p>When i add a new node to the d3, i passed data to both <code>FDCTreeViewComponent</code> and <code>CapabilityTreeComponent</code> since i thought both were different components and they had to have separate methods to add the new node in their respective trees.</p>
  
  <p>But the nodes were getting added twice in both components.</p>