Is there a free tool I can use to convert a json file to a csv?
-
-
Answer:
Hi the below is a simple HTML-Javascript code to convert JSON to CSV. Copy the below code to a file and then run it in your browser. You will see the following screen-shot As you can see you can copy paste the JSON and specify the root of the JSON(data in this case). On clicking submit, a csv file is generated which is downloaded to your PC(with the name "download"). Just Open it in Notepad++ and their you have your csv. You may modify the below code to suit your needs. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "Page on w3.org"> <html xmlns="XHTML namespace"> <head> <title>JSON to CSV</title> <!-- <script src="scripts/json.js" type="text/javascript"></script> --> <script type="text/javascript"> function myfunction(){ var json3 = document.forms["myform"]["formarea"].value; console.log(json3); var root = document.forms["myform"]["root"].value; DownloadJSON2CSV(JSON.parse(json3)["data"]); //console.log(json3.data); //(json3.data); } function DownloadJSON2CSV(objArray) { var array = typeof objArray != 'object' ? JSON.parse(objArray) : objArray; var str = ''; for (var i = 0; i < array.length; i++) { var line = ''; for (var index in array[i]) { line += array[i][index] + ','; } // Here is an example where you would wrap the values in double quotes // for (var index in array[i]) { // line += '"' + array[i][index] + '",'; // } line.slice(0,line.Length-1); str += line + '\r\n'; } window.open( "data:text/csv;charset=utf-8," + escape(str)) } </script> </head> <body> <form name="myform"> <textarea id="json_input" name="formarea" rows="30" cols="1000" spellcheck="false" placeholder="Enter JSON to convert" wrap="off" style="resize: both; width: 889px; max-width: 883px;"></textarea> <br/> Enter Above JSON's Root: <input type="text" name="root"><br> </form> <button type="button" onclick="myfunction()">Submit</button> </body> </html> Credits:http://stackoverflow.com/questions/4130849/convert-json-format-to-csv-format-for-ms-excel
Ali Mir at Quora Visit the source
Other answers
Yes, there is. For example, this seems like a reasonably functional online converter: http://www.convertcsv.com/json-to-csv.htm You don't need to write any code to get it to work, just cut and paste your JSON into the window.
Sean Leary
You can use our online http://json-csv.com. It will convert files / text or URLs immediately.
Json Support
Related Q & A:
- What software i can use in making a video?except the movie maker?Best solution by Yahoo! Answers
- Where is a place that I can download SAI Paint Tool for free?Best solution by Yahoo! Answers
- How can i export my contacts to a csv file?Best solution by Yahoo! Answers
- How do I download a picture so I can use it on my profile?Best solution by Yahoo! Answers
- How to convert a .DMG file into a .EXE?Best solution by answers.yahoo.com
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.