Multiple Json strings to CSV
See original GitHub issue` private static void Main(string[] args) { List<string> temp = new List<string>(); temp.Add(“{"col1":"123","col2":{"col21":"aaaa"},"col3":null,"col6":"zzzz"}”); temp.Add(“{"col1":"456","col2":null,"col3":{"col4":"bbbb","col5":"cccc"}”);
using (var w = new ChoETL.ChoCSVWriter(Console.Out))
{
int i = 0;
foreach (var item in temp)
{
using (var r = ChoETL.ChoJSONReader.LoadText(item))
{
if (i == 0)
w.WithFirstLineHeader();
i++;
w.Write(r);
}
}
}
} `
What am I doing wrong here ?
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Convert multiple JSON Strings to CSV - java
I need help converting a bunch of json strings to CSVs inside a loop for (MyBusinessObj obj:MyBusinessObjects){ String json ...
Read more >JSON to CSV - Convert document online
How to convert JSON to CSV: ... 1. Click the "Choose Files" button to select multiple files on your computer or click the...
Read more >How do I use Python to read multiple JSON files and export ...
What I am trying to do is collect a few but same values from many .json ... import json import glob from datetime...
Read more >How do I convert multiple JSON files to CSV?
One way is to use the built-in CSV module to read the CSV file, and then use the json.dumps() method to convert it...
Read more >alefianrahman/multiple-json-to-csv: A file converter that ...
A file converter that converts multiple JSON files into a CSV file. Tutorial: How to Use the Script. Clone this GitHub repository into...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
No, combine to one CSV with all json nodes.
Here is another approach: https://dotnetfiddle.net/sOuwe8
if code, country to come before other fields, here is how you can do so
https://dotnetfiddle.net/x8EagT