We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b4124b3 commit 8c34c28Copy full SHA for 8c34c28
components/CredentialDetailsTree.vue
@@ -33,8 +33,13 @@ export default {
33
const value = toRaw(obj[key] || obj);
34
const node = {id: crypto.randomUUID(), label: key, children: []};
35
if(Array.isArray(value)) {
36
- value.forEach(subValue => {
37
- createNodeList(subValue, value[subValue] || {}, node.children);
+ // if value is an array of objects, make each key its index
+ value.forEach((subValue, index) => {
38
+ if(typeof value[0] === 'object') {
39
+ createNodeList(`index ${index}`, subValue || {}, node.children);
40
+ } else {
41
+ createNodeList(subValue, value[subValue] || {}, node.children);
42
+ }
43
});
44
} else if(typeof value === 'object') {
45
Object.keys(value).forEach(subKey => {
0 commit comments