TreeModelGitHub

Manipulate and traverse tree-like structures in javascript.

These bundles are UMD compatible (courtesy of browserify)

Create a new TreeModel

// hint: TreeModel, tree and root are // globally available on this page tree = new TreeModel(); root = tree.parse({ id: 1, children: [ { id: 11, children: [{id: 111}] }, { id: 12, children: [{id: 121}, {id: 122}] }, { id: 13 } ] });