1

I recently downloaded my location history from Google. From 2014 to present.

The resulting .json file was 997,000 lines, plus a few.

All of the online converters would freeze and lock up unless I did it in really small slices which isn't an option. (Time constraints)

I've gotten a manual process down between Sublime Text and Libre Office to get my information transferred, but I know there's an easier way somewhere.

I even tried the fastFedora plug-in which I couldn't get to work.

Even though I'm halfway done, and will likely finish up using my process, is there an easier way?

I can play with Java though I'm no pro. Any other languages that play well with .json?

A solution that supports nesting without flattening the file. Location data is nested and needs to remain nested (or the like) to make sense. At least grouped.

Ja-oon Solo
  • 93
  • 10
  • [jq](https://stedolan.github.io/jq/) would make short work of this. For example: http://stackoverflow.com/questions/32960857/how-to-convert-arbirtrary-simple-json-to-csv-using-jq – Jordan Running Jan 15 '17 at 15:24
  • Can't see from that example, but my .json file is nested. In some place 3 or 4 deep. – Ja-oon Solo Jan 15 '17 at 15:39
  • CSV is a "flat" format. It has rows and columns. There is no "standard" way to nest or group in CSV. The first thing you'll need to do is figure out how to represent your data in rows and columns. – Jordan Running Jan 15 '17 at 15:44
  • Not sure how fast or efficient this would be but maybe use PHP json_decode() to turn it into a multidimensional array, then convert array to CSV like mentioned here: http://stackoverflow.com/questions/3933668/convert-array-into-csv ? – tamak Jan 15 '17 at 15:49
  • Do you have nested collections? In that case you will have to flatten the tree representation on the CSV side using relationships by identity. – plalx Jan 15 '17 at 16:12
  • "Relationships by identity". Like appending the nested element? – Ja-oon Solo Jan 15 '17 at 18:35

0 Answers0