day8/re-frame-10x

Allow inspectors to get into lists

Closed this issue · 1 comments

When creating an inspector, we can get into vectors like so:

[:settings 0 :size]   (0 gets into first item of the vector at :settings)

Unfortunately this doesn't work for lists, as Clojure/Script doesn't associate an index with the elements of a list. Some example code:

(get-in {:a [{:b 1}{:c 2}]} [:a 1])
=> {:c 2}

(get-in {:a '({:b 1}{:c 2})} [:a 1])
=> nil

Is it possible to be fancy when a list is detected at the point we enter an index and make it work as we would expect/hope?

Although this is tagged as an enhancement, it's one of those things that sometimes stops you dead when you really want to drill down into a data structure