title: How to compare two json responses and see the differences in Postman?
body: <p>I need to create tests in Postman where I compare two responses for two different requests and I want to see what is (if there is anything) the difference between them.
  Case is that I can get json response which can contain anything, then I need to check if on different environment the same request gave the same response. 
  Right now I do it that way:</p>
  
  <p>In first request I save responsee:</p>
  
  <pre><code>pm.globals.set('response', pm.response.json());
  </code></pre>
  
  <p>In second request I compare response with saved one with:</p>
  
  <pre><code>pm.test('Should have identical responses as previous', () =&gt; {
  pm.expect(pm.response.json()).to.deep.equal(pm.globals.get('response'));
  });
  </code></pre>
  
  <p>But in this case I just see if there is any difference, so I have to go through a lot of lines each time to find what was wrong.</p>
  
  <p>What I need to get is when I have first response like:</p>
  
  <pre><code>[
      {
          color: "red",
          value: "#f00"
      },
      {
          color: "green",
          value: "#0f0"
      }
  ]
  </code></pre>
  
  <p>And second like:</p>
  
  <pre><code>[
      {
          color: "red",
          value: "#f00"
      },
      {
          color: "green",
          value: "#0f2"
      }
  ]
  </code></pre>
  
  <p>I want to get info in run results like:</p>
  
  <pre><code>there is difference in line: value: "#0f2"
  </code></pre>
  
  <p>or </p>
  
  <pre><code>in first response there was value: "#0f0" and in second there is value: "#0f2" 
  </code></pre>
  
  <p>Is it even possible to do?</p>