
Announcements
I have a flow that reads csv file line by line, and the flow has the following compose action:
the output will looks as the one below:
In the next step, I'm trying create a map to get each value from by using the compose action
split(item(),';')[0]
split(item(),';')[1]
split(item(),';')[2]
this works well for the first row, but not for the second one as it has a string with comma and the value is surrounded by \" \" so the map will look as:
[
"Name": "First item",
"Description: "This is the test of the first item",
"Amount": "1"
{
},
{
"Name": "Second item",
"Description: "\"The second",
"Amount": "and last item\""
}
]
Could you help me to get the values correctly?
If your CSV data has commas within the values, it definitely makes it much harder to extract out.
See my solution (link below) that uses Office Scripts to pass in a CSV file and it return the JSON data - including handling embedded commas.
Solved: Re: Parsing a CSV that contains embedded commas - Power Platform Community (microsoft.com)
----------------------------------------------------------------------
If I've answered your question, please mark the post as Solved.
If you like my response, please consider giving it a Thumbs Up.