In a post or put request, I want to skip field in array when variable is blank in CSV file. Here in this example “bullets5” is blank.
fields in CSV file
item_id,title,bullets1,bullets2,bullets3,bullets4,bullets5
1234,men shoes,Textile,Rubber sole,Lace up closure,fabric lining,
{
“item_id”: “{{item_id}}”,
“fields”: [
{ “name”: “title”, “value”: “{{title}}”},
{ “name”: “bullets1”, “value”: “{{bullets1}}”},
{ “name”: “bullets2”, “value”: “{{bullets2}}”},
{ “name”: “bullets3”, “value”: “{{bullets3}}”},
{ “name”: “bullets4”, “value”: “{{bullets4}}”},
{ “name”: “bullets5”, “value”: “{{bullets5}}”}
]
}
Thanks.