{
"a":{"x":"y","x1":"y1","x2":"y2"},
"b":{"z":"c","z1":"c1","z2":"c2"}
}
$.getJSON('bt.json', function (data) {
var items = [];
$.each(data, function (key, val) {
items.push('<option id="' + val + '" value="'+val+'">' + key + '</option>');
});
$('<select/>', {
'class': 'my-new-list',
html: items.join("")
}).appendTo('.model');
$.getJSON('bt.json', function (data) {
var items = [];
$.each(data, function (val) {
$.each(val, function (key, val) {
items.push('<option id="' + val + '" value="'+val+'">' + key + '</option>');
});
});
$('<select/>', {
'class': 'my-new-list',
html: items.join("")
}).appendTo('.model');
$.getJSON('ko.json', function (data) {
var items = [];
$.each(data, function (key,val) {
$.each(val, function (key1, val1) {
if (key=='bt'){items.push('<option id="' + val1 + '" value="' + val1+ '">' + key1 + '</option>');}
});
});
$('<select/>', {
'class': 'my-new-list',
html: items.join("")
}).appendTo('.model');
})