Demo of an interactive “jq” that previews the results of your expressions as you type, allows saving/loading intermediate expressions, and prints out the final expression when it exits.
In this screencast I take a json file containing ISO 3166 country codes and locations and transform the data to a flat dict that maps top-level country names to a lat+lon string.
Details: ijq is run with a json file to work with. Initially the entire file will be pretty-printed. At this point, anything typed will be fed to jq which will update the preview window with the result. Hitting [Enter] saves the current line, making it available as an option to load. Selecting a saved line with [Up]/[Down] and hitting [Tab] loads it. Hitting [Esc] exits the program and prints the last expression to the terminal.