My function is
public function actionGetMy() {
[
{
color: "red",
value: "#f00"
},
{
color: "green",
value: "#0f0"
},
{
color: "blue",
value: "#00f"
}
]
}
Now how should I write select2 query to bring data into the field. The select field is
<select name="My[]" multiple id="my">