I can use the expression $..*[?(@[*] = "\r\n")] to for example search for any instances of the exact string "\r\n" in a tree structure. This works but it returns the "parents" of the leaf "\r\n" nodes, i.e. the dict or list containing the string.
Is there any way to get the strings/leaves themselves as results? This isn't useful for the case where you're matching an exact string, but would be useful for regexes for example.
I can use the expression
$..*[?(@[*] = "\r\n")]
to for example search for any instances of the exact string "\r\n" in a tree structure. This works but it returns the "parents" of the leaf "\r\n" nodes, i.e. the dict or list containing the string.Is there any way to get the strings/leaves themselves as results? This isn't useful for the case where you're matching an exact string, but would be useful for regexes for example.