SchemaToCode
NGX-SCHEMA-TO-CODE

You can set options sub-property(metadata) for the select, radio & checkbox array. Following are the different ways to define options.

Using simple string array

"optionValues": ["Account", "Human Resource", "Marketing", "Sales"]

Using description and value object array

"options": [
  { "desc": "Account", "val": "acc" },  // val must be match with dataType
  { "desc": "Human Resource", "val": "hr"},
  { "desc": "Marketing", "val": "mkt"},
  { "desc": "Sales", "val": "sale" }
],

Using source url

"source": "http://workingapi.com/department"
"descField": "name",
"valField": "code",                     // should be match with dataType
"parentObject": "allDept"               // only if descField and valField data does not available at root level

Related Topics:

Checkbox Group,   Radio,   Select