OK I spent spent a lot of time looking over examples but can\'t find one which helps me enough for my situation. I have a JSON file, simplified for this example:
<
This should do the trick.
$.each(data.Company, function(key, val) { $select.append('' + val.Position + ''); }); $("#job").change(function(e) { $select2.empty(); $index = $(this).children(':selected').attr('id'); for (var k in data.Company[$index].Name) { $select2.append('' + data.Company[$index].Name[k] + ''); } });