Skip to content

Instantly share code, notes, and snippets.

@msszczep
Created June 26, 2018 23:12
Show Gist options
  • Save msszczep/52307a32dd30dfb53a925296eb15bf6d to your computer and use it in GitHub Desktop.
Save msszczep/52307a32dd30dfb53a925296eb15bf6d to your computer and use it in GitHub Desktop.
Get JSON Data via InLein script
'{:dependencies [[org.clojure/clojure "1.8.0"]
[cheshire "5.8.0"]]}
(require '[cheshire.core :as json])
(def j (cheshire.core/parse-string (slurp "j.json") true))
(def file-names (->> j
:definitions
(map (comp last #(clojure.string/split #"\.") :file))
distinct
(filter (partial re-find #"css"))))
(println file-names)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment