Skip to content

Instantly share code, notes, and snippets.

@qharlie
Created December 5, 2016 15:49
Show Gist options
  • Save qharlie/18ea5f328d11e72609878e023819ed01 to your computer and use it in GitHub Desktop.
Save qharlie/18ea5f328d11e72609878e023819ed01 to your computer and use it in GitHub Desktop.
(condition-case nil
(delete-file "/tmp/scratch.json")
(error nil))
;; I'm trying to collect .data.title, .data.score, and .data.url so I can access them in another function
(require 'json)
(url-copy-file "https://www.reddit.com/r/emacs/.json" "~/scratch.json")
(mapcar (lambda (entry)
(let-alist entry .data.url ))
(let-alist (json-read-file "~/scratch.json") .data.children))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment