check if the property exists in the response JSON
Tests that the property
status
exists in the response JSON
pm.test('Has "status" property', function() {
    var jsonData = pm.response.json();
    pm.expect(jsonData).to.have.property('status');
});
The response JSON
{
    "status": {
        "code": 400,
        "text": "Mobile Number is required"
    }
}
by Valeri Tandilashvili
4 years ago
Postman
postman tests
0
Pro tip: use ```triple backticks around text``` to write in code fences