Ok, that worked very well and easy @Mayank Pujara . Now, another question. Is there some method to strip out undesired fields in this CSV output? There are columns I really do not care about, particularly uid, role, confirmed_at, last_sign_in_at,sign_in_count,last_active_at_activated for example. Can I simply call out those column names to remove them from the output of ChoCSV writing?
Code only grabs first record from JSON c#
bbcompent1
66
Reputation points
Greetings folks, I have an application that takes a JSON resource file and is supposed to write the JSON out with all records into a CSV. However, what's happening is it writes the first record and quits. I'm not quite sure what's wrong TBH. I'm going to include the code and a sample file to use for testing so you can replicate my issue. Just for clarification, ensure to name response.txt to response.json. Thanks in advance.246013-exporter-code.txt246041-response.txt
2 answers
Sort by: Most helpful
-
-
Mayank Pujara 1 Reputation point
2022-10-03T15:03:41.637+00:00 Great to hear it worked .. @bbcompent1