--- title: The Select2 data format taxonomy: category: docs --- Select2 can render programmatically supplied data from an array or remote data source (AJAX) as dropdown options. These will be rendered as actual `` sections, options should be nested under the `children` key of each group object. The label for the group should be specified as the `text` property on the group's corresponding data object. ``` { "results": [ { "text": "Group 1", "children" : [ { "id": 1, "text": "Option 1.1" } { "id": 2, "text": "Option 1.2" } ] }, { "text": "Group 2", "children" : [ { "id": 3, "text": "Option 2.1" } { "id": 4, "text": "Option 2.2" } ] } ], "paginate": { "more": true } } ``` >>>> Because Select2 generates an `` when creating nested options, only [a single level of nesting is supported](/dropdown/option-groups). Any additional levels of nesting is not guaranteed to be displayed properly across all browsers and devices.