Snippet for retrieving value from json

Here is the snippet i am trying

pm.test(“Funding is false”, function () {
var jsonData = pm.response.json();
console.log(+jsonData.Int.Funding.value);
pm.expect(jsonData.Int.Funding).to.equal(false);
//console.log(+jsonData);
});

results in error : Funding is false | AssertionError: expected undefined to equal false

Have a Body like the below structure

{
id : 1234567890
Int: {
Funding : false
}
}

i am trying to get value of Funding which is here false

below code would suffice my purpose at present.

var response = JSON.parse(responseBody);
tests[“Funding is false”] = response.Int.Funding === false;

should be “to.eql(false)”

2 Likes