I have a large JSON file that I am largely familiar with, but I have to jump around the file in VIM quite a bit and tweak options and such.
I was wondering if there is a VIM plugin available that allows me to specify a JSONPath / jq / JMESPath path on the search command line to easily jump to a specific key/value object in the file?
I found a comparable plugin for xpath in XML files: https://github.com/actionshrimp/vim-xpath , but the JSON-based plugins I have found only deal with syntax highlighting, linting, pretty-printing/formatting, etc.
Ideally, I'd like to just be able to use JSON Path notation (or the like) to easily jump to the spot in my JSON file I need to read/modify/etc.
input_line_number
filter ofjq
, but this seems to provide the matching line numbers only for multiple single line JSON strings input. Are you working on a single indented JSON file? If you can output the line of the intended match with any of these tools, getting Vim's cursor to jump at it is trivial. I don't know about xpath capabilities but live evaluation might require a more consequent script.