jkk / formative

Web forms for Clojure and ClojureScript - rendering, parsing, and validating
208 stars 18 forks source link

add getf, getf1 to help with nested values? #24

Open jkk opened 11 years ago

jkk commented 11 years ago

(getf :foo.bar {:foo {:bar 1}}) => 1 (getf "foo[bar]" {:foo {:bar 1}}) => 1 (getf "foo[bar]" {"foo" {"bar" 1}}) => 1 (getf "foo[bar]" {"foo[bar]" 1}) => 1

For :flatten fields? (getf "foo[bar]" {"foo-bar" 1}) (getf "foo" {"foo-bar" 1 "foo-qux" 2}) => {"bar" 1 "qux" 2"}) ???