1.Created logic app as shown below:

2 .Created container in storage account and uploaded a CSV file in container.

3.Next using compose action to split the contents of the CSV file on every new line into an array.
a. Here is the expression used in SplitLines compose action:
split(body('Get_blob_content_(V2)'),decodeUriComponent('%0D%0A'))
b. Follow the below MS Doc to write expressions:
4. Removing last(empty) line from previous output using another compose action as shown below ,
take(outputs('SplitLines'),add(length(outputs('SplitLines')),-1))

5.Separating field names using compose action
split(first(outputs('SplitLines')), ',')
- Forming json as shown below using Select action,
**From**: **`skip(outputs('RemoveLastLine'), 1)`**
**Map:**
**`outputs('SplitFieldName')[0]`** **`split(item(), ',')?[0]`**
**`outputs('SplitFieldName')[1]`** **`split(item(), ',')?[1]`**

- Tested logic app and it is running successfully. 

Content of CSV file is as shown below:

Csv data is formatted as json:

Reference:Use data operations in Power Automate (contains video) — Power Automate | Microsoft Docs
Credit: @Iason Koulas