Data Mapping - Whether To Use a JSON Object or JSON Array
This article elaborates composition of the Data Bean Path for different types of UI components.
Broadly, UI Components can either support a single record or multiple records.
An example of a UI Component supporting a single record is Section. A Section is a container for other UI elements such as Text, Label, Radio Button, etc.
Examples of UI components supporting repeating records are Grid, Dropdown list, and Chart. A Grid displays multiple rows, whereas a Dropdown list displays more than one option.
The Data Bean Path supports both types of UI components.
The Data Bean Path for the UI component supporting a single record is a JSON Object; whereas the Data Bean Path for the UI component supporting multiple records is a JSON Array of JSON Objects. In this case, each JSON Object in the JSON Array represents a single row, and each Key in the JSON Object represents a single data element.