AykutSarac / jsoncrack.com

✨ Innovative and open-source visualization application that transforms various data formats, such as JSON, YAML, XML, CSV and more, into interactive graphs.
https://jsoncrack.com/
Other
29.95k stars 1.81k forks source link

[BUG]: <Node path inconsistencies> #327

Open Shubhdeep12 opened 1 year ago

Shubhdeep12 commented 1 year ago

Issue description

Today, the node path represents using the dot property.

image

which can cause issues under some scenarios as shown above in the screenshot.

Suggested Solution: We can display the node path like this {root}["child1"]["child2"]

Media & Screenshots

No response

Operating system

Priority this issue should have

Low (slightly annoying)

AykutSarac commented 1 year ago

This is a good argument, but speaking of readability I believe dot notation is better but I see the problem here. Perhaps the solution here could be identify if the object key includes the RegExp \[\d+\] then we can display is as {Root}["members[0]"] then the rest may continue with dot notation. How does that sounds?