Object keys as label

Hi Team, I’m searching for a way to create a list view in angular, where the list labels are the keys of an object and the detail view is created by the value object (same structure for each value object), for example:

const data = {
key1: {
detail1: true,
detail2: “lorem ipsum”,
},
key2: {
detail1: true,
detail2: “lorem ipsum”,
},

};

Is there any buildin component to cover this usecase?

As far as i understand a ‘ListDetailView’ is just for arrays where the label is one of the properties of the containing object.

[original thread by derdeka]

Hi @derdeka(derdeka), you’re right ListDetailView is intended for arrays and there is no built-in control to cover this object use case. So you’ll need a custom renderer for this.

Most likely you can subclass or at least copy&modify the existing master renderer (i.e. ListDetailView) to also cover the object use case in a relatively straightforward way. This would be a good opportunity to generalize the existing renderer and then just bind it in two different ways to cover both use cases.