Home > Blockchain >  how to parse a csv file with a specific pattern to am array in Logic App Service
how to parse a csv file with a specific pattern to am array in Logic App Service

Time:02-21

i would like to convert a csv file and to put the outputs into dedicated arrays which will be sent to an azure function. there are 3 challenges in this process :

  1. what is the method to read csv file from an email attachment

  2. this is an example of how the format of the file looks like :

enter image description here

so the headers are stored at every row in column A and the value is stored at Column B. i need to extract the values to an array based on the header that is specified in Column A

3.on each value there is a need to remove the next strings []

what is the best practice to implement this operation

CodePudding user response:

There's a good answer with screenshots here: HTTP

Result

Result

JSON

{
  "IP Address": [
    "Value 1",
    "Value 2",
    "Value 3",
    "Value 4",
    "Value 5"
  ],
  "Domain": [
    "Value 6",
    "Value 7",
    "Value 8",
    "Value 9",
    "Value 10",
    "Value 11"
  ]
}
  • Related