Skip to content

Copy path of a selected node #165

Open

Description

@qkxie

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

Activity

  1. changdy commented on Jun 29, 2023

    @changdy

    It is a good idea . and very useful

  2. Maximization commented on Sep 16, 2023

    @Maximization

    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.

  3. qkxie commented on Sep 18, 2023

    @qkxie
    Author

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

  4. CrudeCreations commented on Apr 7, 2024

    @CrudeCreations

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions