This prints :bar
in Clojure as I would expect:
(println (:foo (clojure.tools.reader.edn/read-string "{:foo :bar}")))
;=> :bar
But this prints nil
in ClojureScript:
(println (:foo (cljs.reader/read-string "{:foo :bar}")))
;=> nil
To make things stranger, this prints :bar
in ClojureScript as I would expect:
(let [data (cljs.reader/read-string "{:foo :bar}")]
(println ((first (keys data)) data )))
;=> :bar
How do I access a value in a map that was created by the reader? Is this a character encoding thing?
Edit
Here's the namespace as requested in the comments:
(ns clojuresite.homepage
(:require-macros [hiccups.core :as hiccups])
(:require [hiccups.runtime :as hiccupsrt]
[cljs.nodejs :as node]
[cljs.reader :as reader]))