Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy path of a selected node #165

Open
qkxie opened this issue Jun 9, 2023 · 4 comments
Open

Copy path of a selected node #165

qkxie opened this issue Jun 9, 2023 · 4 comments

Comments

@qkxie
Copy link

qkxie commented Jun 9, 2023

Hope there is a feature to copy the path of the selected in the format of a target language.

for example:

{"a": {"b": {"c": 1}}}

In Python, the copied value should be: root['a']['b']['c']

In JavaScript, the copied value should be: root.a.b.c

@changdy
Copy link

changdy commented Jun 29, 2023

It is a good idea . and very useful

@Maximization
Copy link

Yes! This is exactly what I'm looking for. My use case is to paste a deeply nested object in JSON Hero, navigate to the value I want through the UI, and would love to copy with a single click the JavaScript I need to use to get that value programatically.

@qkxie
Copy link
Author

qkxie commented Sep 18, 2023

I posted this issue 3 months ago, but the author hasn't even replied to me, let alone started developing this feature.

@CrudeCreations
Copy link

CrudeCreations commented Apr 7, 2024

I posted this issue 3 months ago, but the author hasn't even replied to me, let alone started developing this feature.

These guys also have a full time job, the code's open source and if you really need a feature you can write it yourself and make a PR. Here I threw one togethere for you.

I've added a 'Copy Path' button that lets you copy in JS or Python at the moment. Use my fork until they add this feature if you're desperate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants