# Show Labels for Array Elements

**URL:** <https://jsonforms.discourse.group/t/show-labels-for-array-elements/1900>\
**Category:** General\
**Created:** [January 7, 2024, 11:47am UTC](https://jsonforms.discourse.group/t/show-labels-for-array-elements/1900 "2024-01-07T11:47:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pbarth](https://avatars.discourse-cdn.com/v4/letter/p/aeb1de/32.png) [@pbarth](https://jsonforms.discourse.group/u/pbarth)\
**Post date:** [January 7, 2024, 11:47am UTC](https://jsonforms.discourse.group/t/show-labels-for-array-elements/1900/1 "2024-01-07T11:47:26Z")

</div>

Hello,

I have a question regarding the ArrayRenderer with complex objects. The Data looks like this:

[  
{  
“Id”: “XX”,  
“Name”: “XXX”,  
“Numbering”: “X”,  
}  
]

Now I want the collapsed entries within the array to have a label (the “Name” property). Right now it does look like this:

 ![image](https://global.discourse-cdn.com/free1/uploads/jsonforms/original/1X/1944583acf12d3e1ae110e03dbe0cc031d1ac3ae.png)

Can I somehow use the default Renderer and tell it to add a label to the collapsed element so I know what is inside?

Thank you for your help.

Best regards

---

<div class="post-metadata">

**Author:** ![sdirix](https://yyz2.discourse-cdn.com/free1/user_avatar/jsonforms.discourse.group/sdirix/32/1073_2.png) [@sdirix](https://jsonforms.discourse.group/u/sdirix)\
**Post date:** [January 8, 2024, 3:15pm UTC](https://jsonforms.discourse.group/t/show-labels-for-array-elements/1900/2 "2024-01-08T15:15:05Z")

</div>

Hi @pbarth,

By default JSON Forms uses the first (order as in the JSON Schema) string-like property of the contained object as a label. To customize this behavior you can use `elementLabelProp`, see here for the [docs](https://github.com/eclipsesource/jsonforms/blob/b00754cf4c186963ba141c11367f528c9bd5c7e4/packages/material-renderers/src/controls/MaterialEnumControl.tsx#L59-L62).
