diff --git a/panel/components/json-tree/json-tree.js b/panel/components/json-tree/json-tree.js index 994d965..86e3d47 100644 --- a/panel/components/json-tree/json-tree.js +++ b/panel/components/json-tree/json-tree.js @@ -64,9 +64,14 @@ function batJsonTreeDirective() { var val = object[key]; var fullPath = depth; if (depth) { - fullPath += '.'; + if (Number.isNaN(parseInt(key, 10))) { + fullPath += '.' + key; + } else { + fullPath += '[' + key + ']'; + } + } else { + fullPath += key; } - fullPath += key; var parentElt = angular.element('
  • ' + '' + key + '' +