Populating values to multiple combobox from a single json file

I need to populate values to different combobox from a single json file.JSON file containing two arrays.One named as ‘Country’ and other named as ‘State’.I need to populate the values inside ‘Country’ to one combobox and the values inside ‘State’ to the second combo box.My json file is given below,

{
    "data": [
        {
            "Country": [
                {
                    "id": "1"
                },
                {
                    "value": "USA"
                }
            ],
            "State": [
                {
                    "id": "1"
                },
                {
                    "value": "New York"
                },
                {
                    "id": "2"
                },
                {
                    "value": "Florida"
                }
            ]
        }
    ]
}

If it is possible in webix please give advise.

You can use webix.ajax helper to load json, parse it and then populate comboboxes:

http://docs.webix.com/helpers__ajax_operations.html

webix.ajax("some.php", function(text,data){

    var data = data.json().data;
    if(data){
          var country = data[0].Country;
          var state = data[0].State;
          // create correct arrays
          // and populate combos
    }
});

Note, that data in Country and State arrays should be converted into different format if you want to populate webix combos. Please see Combo samples and docs for details.

Thanks for the advise.I need to know one more thing how can i set this response data as options of combo from the above call back function.Which method is used for the procedure.

You can set options array for your combo:

combo.define("options",[{id: "1",value: "USA"}]);
combo.setValue(1); // if you need to set value

Thanks Maria,for the valuable advice.

You are welcome!