CSV file import for bulk data for array with strings

Hi I have a request body look like:-
“ABC”: [
“a;a;local;wifi” , “a;a;local;wifi”, “a;a;local;wifi”
],

So i want to automate this by importing csv for the string values in this array ABC.

Please help me how to import multiple bulk data via CSV… Let me know the Postman changes and CSV file how to create. I’m using Excel and saving that as .csv

I’ve tried below solutions but it is only importing single value
I’ve made json file as:-
“ABC”: [
{{ABC}}
],
And in CSV i’ve passed in excel as column name ABC with multiple values in that column as :
ABC
“a;a;local;wifi”
“a;a;local;wifi”
“a;a;local;wifi”
“a;a;local;wifi”

The collection runner will run once for each row in your CSV file.

Your request body JSON appears to be an array of strings.

If you really want to send this data in one go (as a single request) then you will need to store the data in a single row\column in the CSV file (enclosed in brackets so that it gets treated as an array).

["a;a;local;wifi","a;a;local;wifi","a;a;local;wifi"]

Which if you have a lot of entries may be a bit difficult to read.

Or the other option is to not use a CSV file as the input, but store the data in JSON instead.

The following example has a single object (therefore will only run one iteration).

{
    "ABC": [
        "a;a;local;wifi",
        "a;a;local;wifi",
        "a;a;local;wifi"
    ]
}

Which would then work with the following request body.

{
    "ABC": [
        {{ABC}}
    ]
}

Have a look at the following Learning Centre articles.

Importing data files | Postman Learning Center

Using CSV and JSON Data Files in the Postman Collection Runner | Postman Blog

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.