Try something like this:
This is your JSON object. Realistically, it would be loaded from your server.
<script type="text/javascript">
var jsonObj = { location: [
{ "name": "france", "address": "merde" },
{ "name": "london", "address": "shiite" }
]
}
</script>
In your page, assume you have a <select> element with an id of "dropDown"
<select id="dropDown"></select>
Finally, when your page has finished loading, this code will populate your drop-down list.
var myDDL = document.getElementById("dropDown");
for (i = 0; i < jsonObj.location.length; i++) {
var option = document.createElement("option");
option.text = jsonObj.location[i].name;
option.value = jsonObj.location[i].address;
try {
myDDL.options.add(option);
}
catch (e) {
alert(e);
}
}