ok let me explain further and maybe it will make sense.
the input file is a number, say a telephone number. this number is used to query a data source which returns a response body with some data related to the number. It does not however echo back the number itself. So to write the number to file together with the response body I need to access to iterationData as the request is made. It works via preRequest scripts and the on console event as we discussed above.
The data is indeed in the options for the Newman run
newman.run({
iterationData: 'data.json'
})
I dont know if this iterationData can be accessed in the events which is why I have to go via the console at the moment. There is possibly a better way but I havent found it so far.