Looping through data files; discrepancy in the sample code?

I could not find any answers for this when searching;
The code in the screenshot does not seem to match the code in the data files you can download on the Working with Data Files page. How does one get this to work? With this discrepancy, I am not able to determine the correct syntax.
My tests failed before; now they are neither passing or failing.
I am trying to loop through a file and validate the correct API outputs.

Hey @WhatsSoMaybeAboutKat! Thank you for catching this discrepancy. I recommend using the pm syntax in the screenshot as it looks like the download currently uses our deprecated syntax.

I’ve opened a new issue on our docs github here to get that fixed. Postman docs are open source, so if you spot any issues in the future and would like to send them in or even submit a pull request, we love to receive them. We’re also happy to take feedback here (just like your post!) — all of it helps us keep improving our docs. :grinning:

(p.s. if you’d like to skip manually copying the text in the screenshot to your existing collection, check the file I added in github)

2 Likes