Postman/Pre-request Script get csv file data and save as environment variable
When I do postmande run collection, I add the csv file, but I couldn’t manage to pull this data and save it to environment variables at the pre-request script stage.after that ı will use this varible from environment in my boddy section code to update data on the server.
let lojistikmaliyeti = Number(price);
pm.environment.set(“Lojistik Maliyeti”, lojistikmaliyeti);
the code is as above. My first line is the part where I need to define the data I took from the csv file into the “price” object. I left the part where it pulls data from csv blank.
ı tryied pm.collectionvariables.get combination or fs library and split but ı didnt get right conclusion