Code QuizAdvanced

Postman Assertion on JSON Body

Spot the mistake in a Postman test that reads the parsed response body.

Codejavascript
pm.test("Status code is 200", function () {
    pm.response.to.have.status(200);
});

pm.test("Response has correct user id", function () {
    var jsonData = pm.response.json;
    pm.expect(jsonData.id).to.eql(101);
});

The status test passes but the second test always fails even when the API returns the right id. What is the bug?