skip to Main Content

Javascript – How to validate JSON response using JSON test data file?

Having JSON response with nested elements. I would like to validate it against JSON test data using Postman and test functions. For the moment I can easily reach it by hardcoding: const jsonData = pm.response.json(); pm.expect(jsonData.items[0].title).to.eql(pm.iterationData.get("title")); pm.expect(jsonData.items[1].title).to.eql(pm.iterationData.get("title")); here is my…

VIEW QUESTION
Back To Top
Search