r/Clojurescript • • Dec 06 '22

Nested Values in JS Objects

Can anyone tell me why this is evaluating to nil?

(let [m (clj->js {"values" {"ab-c" "treas"}})]
    (.. m -values -ab-c))
4 Upvotes

6 comments sorted by

View all comments

Show parent comment

1

u/fasttalkerslowwalker Dec 06 '22

Thanks! that was the issue. It's kind of unfortunate how common hyphens are in keywords under normal clojure naming conventions. That's going to require some more calls to js->clj than would otherwise be necessary.