Skip to content

Instantly share code, notes, and snippets.

@jsab
Created November 19, 2013 18:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jsab/7550088 to your computer and use it in GitHub Desktop.
Save jsab/7550088 to your computer and use it in GitHub Desktop.
get vs get-in behavior in clojurescript
;; Returns object
(let [b (JSON/parse "[{\"a\":45}]")]
(get b 0))
;; Returns nil
(let [b (JSON/parse "[{\"a\":45}]")]
(get-in b [0]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment