With how pattern matching works, no, unfortunately. There can't be guarantees the next objects in that Array are all of the same structure or even type, so each subsequent node has either deconstruct or deconstruct_keys called on it.
I've been musing about my own DSL for searching through deeply nested structures because that's always a pain, but haven't experimented too much on it yet.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
With how pattern matching works, no, unfortunately. There can't be guarantees the next objects in that
Array
are all of the same structure or even type, so each subsequent node has eitherdeconstruct
ordeconstruct_keys
called on it.Now that said you might enjoy
jq
and the Ruby wrapper around it: github.com/winebarrel/ruby-jqI've been musing about my own DSL for searching through deeply nested structures because that's always a pain, but haven't experimented too much on it yet.