Imagine a json file with the following data:
[
{
color: \"red\",
value: \"#f00\"
},
{
color: \"green\",
value: \"
You need to change your JSON object to use the "label" property. From the docs:
An Array of Objects with label and value properties: [ { label: "Choice1", value: "value1" }, ... ]
The label property is displayed in the suggestion menu. The value will be inserted into the input element after the user selected something from the menu. If just one property is specified, it will be used for both, eg. if you provide only value-properties, the value will also be used as the label.
Then, you need to set the values of the other text fields when the "change" or "select" events are fired.