{
"success": {
"text": "successfully! deleted Records"
}
}
Want to validate text value is "successfully! deleted Records"
I tried with this
pm.test("Your test name", function () {
var jsonData = pm.response.json();
pm.expect(jsonData[0].text).to.eql("successfully! deleted Records");
});
You're trying to retrieve data from a JSON object, not from an array. Hence, it should be as follows.
pm.test("Your test name", function () {
var jsonData = pm.response.json();
pm.expect(jsonData.success.text).to.eql("successfully! deleted Records");
});