# Adding an object to an array of props

**URL:** <https://forum.inductiveautomation.com/t/adding-an-object-to-an-array-of-props/107234>\
**Category:** Module Development\
**Tags:** perspective\
**Created:** [June 10, 2025, 3:42pm UTC](https://forum.inductiveautomation.com/t/adding-an-object-to-an-array-of-props/107234 "2025-06-10T15:42:27Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [June 10, 2025, 4:53pm UTC](https://forum.inductiveautomation.com/t/adding-an-object-to-an-array-of-props/107234/2 "2025-06-10T16:53:17Z")

</div>

You need to declare the properties correctly in your component's json schema; see this post for more:

> [@Questions regarding style props and how they behave when they are nested](https://forum.inductiveautomation.com/t/questions-regarding-style-props-and-how-they-behave-when-they-are-nested/92195/2):
>
> You need to use the items property [(Json-Schema Array Reference)](https://json-schema.org/understanding-json-schema/reference/array). // The multistate button schema probably looks something like this... { "properties": { "states": { "type": "array", "items": { "type": "object", "default": { "text": "", "value": "", "selectedStyle": {}, "unselectedStyle": {} }, "properties": { …

---

_[View the full topic](https://forum.inductiveautomation.com/t/adding-an-object-to-an-array-of-props/107234)._
