json-viewer
json-viewer copied to clipboard
JSON path for current selection
Could we add the current JSON selector for the current caret/cursor/selection position? Meaning
some_item: [
{
id: 1,
something: something,
url: https://www.some/url/here.com
},
{
id: 2,
something: something,
url: https://www.some/url/here.com
},
{
id: 3,
something: something,
url: https://www.some/url/here.com
},
{
id: 4,
something: something,
url: https://www.some/url/here.com
}
]
if my caret/selection was over the url property in the object with id # 2 then some indicator (maybe at the top or bottom of the screen) shows the current json selector for that element (some_item[1].url
)
That's a good idea
Yes please, can we get this?
Main thing I miss from old JSONView is the ability to see the path in the status bar, and easily copy the path or value via right-click.
I now switch between using JSON Formatter and JSON Viewer, but far as I can tell neither offer that old beloved feature. Would love to see it in JSON Viewer!
Hi @alahosky, I like this feature as well, bear with me :) Right now I'm trying to fix all bugs and corner cases but I keep improving the extension and adding new features from time to time.
This would be great, indeed!
Currently my workaround for this is to paste the JSON in VS Code and get the path via JSONPath plugin, but that is unnecessarily tedious. :(
Beside show and copy the path, I really want to copy the value (useful in long json document). I think no one want to scroll to select 100 lines then press Ctrl+C. Another problem is that, sometime I'm not sure if I am selecting the correct start and end lines of the same item.