Skip to content

Instantly share code, notes, and snippets.

@documentprocessing
Created May 6, 2025 00:35
Show Gist options
  • Select an option

  • Save documentprocessing/c0acc13095af66f22742f50f7a07fb99 to your computer and use it in GitHub Desktop.

Select an option

Save documentprocessing/c0acc13095af66f22742f50f7a07fb99 to your computer and use it in GitHub Desktop.
Loading Data with JSON
$(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