Last active
August 29, 2015 13:56
-
-
Save l1x/9267017 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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