Map as an environmental variable

Hey everyone,

i need to pass a hashmap around as an pm.environmental variable between requests. Only one problem, once i reach the second request, the environmental variable seems to have changed to something i can’t quite recognise. I run this request twice:

First time, the line console.log(!pm.environment.get(‘map’).get(0)); runs just fine and returns true, since it’s not there. Once i run it again in the else statement however, the second iteration, the exact same line gives an error. I want it to return again in the second iteration.

This is the console for evidence:

The problem seems to be that the environmental variable map is no longer a map, but something else that postman has converted. How do i pass a map as an environmental variable between requests in postman?

Thank you for your help and time :slight_smile: !