How to read data from CSV having same column name?

How to read data from CSV having same column name?
I have my CSV as below

Where the actionEvent tag will have multiple occurrence in the response. Currently on runner preview, it is just showing the value of column E and not B. How can i read both?

Note: Below is snapshot of my response, actionEvent will be under an array for each iteration.
image

You can simply get the entire line that is being read with:

pm.iterationData.toObject()

Use console.log to inspect it. See if the data you are looking for is there. If yes, you are lucky.

I have tried that but it’s returning only the last column value , i.e, “abcd” and “efgh” as below :
image

It’s not returning the value “xyz” and “uvwf”.

It will be helpful if you can suggest any other logic to validate these kind of scenario?

If Postman can’t read this because of a duplicate key, the only option I can see is to pre-process the data file, before using it to Postman.

@vdespa May i know how to do pre-processing of the data file?

Moreover, i was trying to do a 2nd option as below -

Like i will be providing as actionEvent_1 and avtioEvent_2 and so on, and while reading the same in the Tests tab will be iterating something like the below one -
image

Can you correct me how to do the same, if this is somehow possible?

Start by manually changing the file. If this works, you may need a script to do this for you automatically, something outside of Postman.

I got a workaround for this -

Stored all the value in the CSV in a single column by providing (,) and then reading entire data. Store to an array after splitting the same as below -

var result = [pm.variables.get(‘actionEvent’)];

console.log(result);

const words = result.toString().split(’,’);

console.log(words);

console.log(words[0]);

console.log(words[1]);