title: Postman Schema Validation of array of JSON
body: <p><strong>My Test Data:</strong>  </p>
  
  <pre><code> {
       "staffId": 1691580015,
       "staffName": "Test Staff",
       "staffEmail": "teststaff@perpule.com",
       "isAdmin": null,
       "isSuperAdmin": null,
       "shopDetails": [
           {
               "shopId": 5004,
               "shopName": "Spar E2E",
               "shopAddress": "Nagpur",
               "shopLocality": "Nagpur",
               "shopCity": "Nagpur",
               "shopState": "Maharashtra",
               "stateCode": "KT"
               }]
  
       }
  </code></pre>
  
  <p><strong>My Test Case code:</strong> </p>
  
  <pre><code>var schema = {  
     //"required":["shopDetails"],
     "type":"object",
     "properties":{  
        "shopDetails":{  
           "type":"array",
           "items":[  
              {  
                 "type":"object",
                 "properties":{  
                    "shopId":{  
                       "type":"integer"
                    },
                    "shopName":{  
                       "type":"string"
                    },
                    "shopAddress":{  
                       "type":"string"
                    }
                 }
              }
           ]
        }
     }
  }  
  
  
  //console.log(JSON.stringify(tv4));
  pm.test('Schema is valid', function() {
    pm.expect(tv4.validate(jsonData, schema)).to.be.true;
  });
  </code></pre>
  
  <p>Issue is it failing every time , how to resolve please help ?</p>