How to convert CSV to JSON using template via Azure Logic App

前端 未结 1 1736
梦谈多话
梦谈多话 2021-01-26 20:07

Is it possible to convert CSV to JSON using built-in/managed/3rd party template, without using Azure Function via Azure Logic App?

Below is using Azure Function, which i

相关标签:
1条回答
  • 2021-01-26 20:18

    I will admit this is not my proudest work but it seems to work fairly well. I was able to turn a CSV file from my onedrive into JSON objects.

    //Updated with less variables, splits, set and replaces actions

    Input

    Output(second object, first object and last needs to be purged)

    How? A lot of steps that could possibly be removed and merged but. Using splits and replace actions I could single out each line and down the line create a JSON object. I was going first for an array but eventually, it was not that hard to make it into a JSON object. Not entirely sure how it works with null values.

    This is probably not the best way to handle this, drawbacks here is that it is a lot of actions, the first object is the headers and that needs to be removed, there will also be a very last object that is just null(which is fine).

    Entire schema

    Concurrency set to 1 here

    0 讨论(0)
提交回复
热议问题