2016-08-10 1 views
0

Ich habe folgende JSON Quelle für das aciTree Plugin und möchte den Wert des Knotens "tree-data" abrufen. Ich sehe keine spezifische Funktion in der Dokumentation. Irgendwelche Gedanken?Erhalte spezifische Knotendaten im AciTree Plugin

[{ 
    "id": "-", 
    "label": "100 - Environment", 
    "inode": true, 
    "open": false, 
    "checkbox": false, 
    "branch": [{ 
     "id": "M-CSP-HID-1301-01W8", 
     "label": "100.10.10 Dangerous Fauna", 
     "inode": true, 
     "open": false, 
     "checkbox": true, 
     "tree-data": "M-CSP-HID-1301-01W8#^Dangerous Fauna#^Low", 
     "branch": [{ 
      "id": "-", 
      "label": "Coming into contact (ingestion, bites, stings, injection) with potentially dangerous animals that include - Invertebrate - Protozoa (one celled organisms - amoeba), Arachnids (Spiders, scorpions), Insects (mosquitoes, fire ants, bees), Crustaceans (Crabs), Annelids (Leeches), Echinoderms (Sea Urchin), Scyphozoa (Jelly Fish): Vertebrate - Fish (Shark, piranha, stingray), Amphibians (dart frogs), Mammals (Cows, Moose, Whales, etc.), Rodents (Rats, mice, etc.), Primates (Apes) , Reptiles (snakes, alligator, etc.), Birds (Raptors)", 
      "checkbox": false 
     }] 
    } 
    ] 

Antwort

1

Ziemlich einfach, ist

var itemData = api.itemData(item); 
tnode=itemData._nodedata; 

"tree-data" zu _nodedata umbenannt.

Verwandte Themen