title: How to find the number of nodes returned in an API response using postman?
body: <p>Suppose the following is the API response:</p>
  
  <pre><code>{
      "content": 
      [
          {
              "id": 90008,
              "capacity": 2,
              "manufacturer": "NISSAN",
              "model": "Sunny",
              "comment": "Nice Compact car.",
              "features": {
                  "high_grade": false,
                  "normal_grade": true
              },
              "images": [
                  {
                      "type": "OUTSIDE",
                      "url": "http://some-image-1.jpg"
                  },
                  {
                      "type": "INSIDE",
                      "url": "http://some-image-2.jpg"
                  }
              ],
              "links": []
          },
          {
              "id": 90009,
              "capacity": 7,
              "manufacturer": "Audi",
              "model": "Q7",
              "comment": "Very good leg space!",
              "features": {
                  "high_grade": true,
                  "normal_grade": false
              },
              "images": [
                  {
                      "type": "OUTSIDE",
                      "url": "http://some-image-1.jpg"
                  },
                  {
                      "type": "INSIDE",
                      "url": "http://some-image-2.jpg"
                  }
              ],
              "links": []
          }
      ],
      "page": {
          "size": 20,
          "total_elements": 2,
          "total_pages": 1,
          "number": 0
      }
  }
  </code></pre>
  
  <p>Now in postman, how will I find out that the total number of parent/main nodes returned in content is 8 which is as follows:</p>
  
  <ol>
  <li>id</li>
  <li>capacity</li>
  <li>manufacturer</li>
  <li>model</li>
  <li>comment</li>
  <li>features</li>
  <li>images</li>
  <li>links</li>
  </ol>
  
  <p>I tried with the following but it failed:</p>
  
  <pre><code>pm.test("Check total no. of nodes in all content is 8", () =&gt; {
      for (i = 0; i &lt; jsonData.content.length; i++) { 
          pm.expect(Object.keys(jsonData.content[i]).length).to.equal(8);
      }
  });
  </code></pre>