I'd do something like (untested): (defn transform [node] (->Node (first node) (map transform (second node))))
On 18 August 2015 at 17:32, Hussein B. <hubaghd...@gmail.com> wrote: > Hi, > > I have the following structure. Node has a string properly and a vector > nodes and of course, each node has a string a property and a vector of > nodes. > > So I created the following record: > > (defrecord Node [title childs]) > > And I have the following JSON response: > > node > string > [ > node1 [ > nn1 > nn2 > .. > nnn] > node2 [ > nn1 > nn2 > .. > nnn] > ] > > What I want to achieve is to transform that JSON response into the > equivalent structure with Node recored type. > > Thanks for help and time. > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with your > first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.