Fork me on GitHub
Ryan Radomski21:11:26

Hey all, Is there a clean way to query the element who's Ident is described in this app-state?

(def init-data
  {:list [{:data "Foo" :type :type1 :group 1}
          {:data "Bar" :type :type1 :group 2}
          {:data "Baz" :type :type2 :group 1}
          {:data "Qux" :type :type2 :group 2}]
   :current {:type :type1 :group 2}})
The GitHub wiki always maps over lists like these. Is it bad practice to try and lookup a single identity in a list like this?

Ryan Radomski21:11:06

I can map over the list easily enough, but it's unclear how to query only the specified item and nothing else

Ryan Radomski23:11:41

I couldn't find exactly what I was looking for, I opted to nomralize my data instead of doing extra lookups