Set arrays length

Hello,
Is there a way to set an array/list length? Say I want to ask data for a fixed set of objects (say, 10 users for example). How should I do that? Also, is it possible to set this size as a config parameter? (for example a first dropdown allows you to choose the number of users, then you have to fill data for the chosen # of users)
Thanks!

Hi @hms,

Is there a way to set an array/list length? Say I want to ask data for a fixed set of objects (say, 10 users for example). How should I do that?

You can use maxItems and newItems as defined in JSON Schema.

Also, is it possible to set this size as a config parameter? (for example a first dropdown allows you to choose the number of users, then you have to fill data for the chosen # of users)

This is not possible within JSON Schema itself as you can’t refer to dynamic values. Within JSON Forms you can easily accomplish that with a custom renderer for your array.