Created
May 6, 2025 00:35
-
-
Save documentprocessing/c0acc13095af66f22742f50f7a07fb99 to your computer and use it in GitHub Desktop.
Loading Data with JSON
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $(document).ready(function() { | |
| $('#jsonTree').jstree({ | |
| 'core': { | |
| 'data': [ | |
| { | |
| "text": "Root Node", | |
| "children": [ | |
| { | |
| "text": "Child Node 1", | |
| "icon": "fa fa-file" | |
| }, | |
| { | |
| "text": "Child Node 2", | |
| "state": { | |
| "opened": true | |
| }, | |
| "children": [ | |
| { | |
| "text": "Grandchild 1", | |
| "icon": "fa fa-file-code" | |
| }, | |
| { | |
| "text": "Grandchild 2", | |
| "icon": "fa fa-file-image" | |
| } | |
| ] | |
| }, | |
| { | |
| "text": "Child Node 3", | |
| "icon": "fa fa-file-alt" | |
| } | |
| ] | |
| } | |
| ] | |
| } | |
| }); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment