-
-
Save viksit/106822bdacd7e1d41ec0 to your computer and use it in GitHub Desktop.
This file contains 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
(defn get-posts-content [posts-data] | |
(do | |
(.log js/console "Posts data -> " posts-data) | |
(prn posts-data) | |
(prn "Type: " (type posts-data)) | |
;; (prn (aget posts-data "msg")) | |
(let [a (js->clj posts-data)] | |
(prn "After conversion, type: " (type a))) | |
(prn (get a "msg")) | |
nil)) | |
Posts data -> Object {success: "true", msg: "Successfully executed function", result: Object} | |
#js {:success "true", :msg "Successfully executed function", :result #js {:posts #js [#js {:tags "foo,bar", :username "viksit", :timestamp "2014-10-03T17:11:25Z", :content "tons of text here", :title "great tite", :url "http://lapwinglabs.com/blog/hacker-guide-to-setting-up-your-mac", :id "1dccce9e-2c82-4502-bec6-038ec278e2a9"} | |
Type: " #<function Object() { [native code] }> | |
"After conversion, type: " cljs.core/PersistentArrayMap | |
nil |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment