How to Save Iteration Response Data to Iteration Variable in Global


I want to save the response for each data iteration as variable in Global. Example the response body showing the access_token, and I would like to save this as variable.

For one time iteration I can do as below,
//Set variable
var response = pm.response.json();
pm.globals.set(“accessToken”, response.access_token)

But if I want to do for iteration more than one, how to set the variable as accessToken[Iteration1], accessToken[Iteration2] and so on…

Btw, I am running the iteration by uploading the CSV file.

Please help me. Really clueless about this.

Thanks in advance.