USING: arrays assocs command-line io io.encodings.utf8 io.files kernel locals prettyprint json.reader json.writer sequences ; IN: todd CONSTANT: location-subkeys { "blurb" "locationcity" } ! These are just examples. (command-line) rest [ utf8 file-contents json> "sections" swap at first "data" swap at [| place | H{ } :> location location-subkeys [| key | key place at key location set-at key place delete-at ] each location "location" place set-at place ] map ] map concat json-print