Find a specific string in an unstructured and nested list

Use Pathex

import Pathex.Combinator
import Pathex.Lenses
import Pathex

tag_lens =
  combine(fn rec ->
    path(:tag, :map) ||| (star() ~> rec)
  end)

Pathex.view(nested_stuff, tag_lens ~> matching("test2"))
2 Likes