Skip to content

Instantly share code, notes, and snippets.

@l1x
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save l1x/9267017 to your computer and use it in GitHub Desktop.
Save l1x/9267017 to your computer and use it in GitHub Desktop.
(require '[clojure.data.json :as json])
(defn uuid
"Returns a new java.util.UUID as string"
[]
(str (java.util.UUID/randomUUID)))
(def cities (slurp "cities.pp.json"))
(def cities-json (json/read-str cities))
(map #(spit (str "t/" (uuid) ".json") (json/write-str %)) cities-json)
(map #(get-in % ["label" "value"]) cities-json)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment