library of babel: added json function for accessing local or remote json objects
commit517837b3a167bf365be71186d13615f4f0c49dcf
authorEric Schulte <schulte.eric@gmail.com>
Sun, 27 Jun 2010 22:50:07 +0000 (27 15:50 -0700)
committerEric Schulte <schulte.eric@gmail.com>
Sun, 27 Jun 2010 23:07:29 +0000 (27 16:07 -0700)
tree0a6934f2b3685e3d905d87b122ee893b3e73b585
parentf63d977c8b914117d6f1b7a2b0cae24b4198e8cd
library of babel: added json function for accessing local or remote json objects

  A quick example of accessing remote json data from Babel code blocks.

  Evaluate the following to see a listing of parks in DC by ward.

  #+source: dc-parks
  #+begin_src emacs-lisp :var keys='(ward address) :var data=json(url="http://ogdi.cloudapp.net/v1/dc/RecreationParks?format=json")
    (append
     (list keys 'hline)
     (mapcar
      (lambda (lis) (mapcar (lambda (key) (cdr (assoc key lis))) keys))
      (cdr (car data))))
  #+end_src
contrib/babel/library-of-babel.org