fix(json-tree): handle inspecting array elements

test-unit-sauce
Brian Ford 10 years ago
parent 6a193f0d14
commit aee24175f4

@ -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('<li title>' +
'<span class="name">' + key + '</span>' +