1

我有以下 aciTree 插件的 JSON 源代码,并希望检索节点的值"tree-data"。我在文档中看不到任何特定功能。有什么想法吗 ?

[{
    "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
        }]
    }
  ]
4

1 回答 1

2

很直白,

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

“树数据”重命名为 _nodedata。

于 2016-08-11T22:41:42.283 回答