awendland / angular-json-tree

Angular directive for displaying a JSON object in an expandable tree structure
Other
79 stars 41 forks source link

$$hashKey attribute is added to the last children #59

Closed hannabasha closed 5 years ago

hannabasha commented 7 years ago

First of all, really nice work!!!

I am working on having a toggle between the code view and the tree view of a JSON object. So when the user clicks to view the tree mode I show the JSON using the package and when the user clicks to view the code mode again I hide the tree view but I notice that the object has an attribute added to the children which is

$$hashKey:"object:695". the number changes depending on the child.

The following is the normal JSON I have

{ "second": "good night", "third": [ 1, "two", 3, { "child": true }, { "parent": true } ], "first": "bye" }

and when I show the tree mode and go back to the code mode I get the following object { "second": "good night", "third": [ 1, "two", 3, { $$hashKey:"object:695", "child": true }, { $$hashKey:"object:696", "parent": true } ], "first": "bye" }

Environment

Angular 1.5.5