Created
December 5, 2016 15:49
-
-
Save qharlie/18ea5f328d11e72609878e023819ed01 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
(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