title: How to validate response in Postman?
body: <p>I am trying to validate response body including errors in postman. How can I validate the response and text below?</p>
  
  <pre><code>{
      "responseHeader": {
          "publisherId": "12345",
          "responseId": "abbcb15d79d54f5dbc473e502e2242c4abbcb15d79d54f5dbc473e502e224264",
          "errors": [
              {
                  "errorCode": "1004",
                  "errorMessage": "XXXX Not Found"
              }
          ]
      }
  }
  </code></pre>
  
  <p>These are my tests which are failing:</p>
  
  <pre><code>tests['response json contains responseHeader'] = _.has(responseJSON, 'responseHeader');
  tests['response json contains errors'] = _.has(responseJSON, 'responseHeader.publisherId');
  tests["Response has publisher id"] = responseJSON.publisherId === 10003;
  </code></pre>