I don't know how to write this task. I'd like to creates dynamically different select inputs that have in common the option.
For example. My json file is that:
data.json
[{"name":"New York","value":"ny"},
{"name":"Los Angeles","value":"la"},
{"name":"Milan","value":"milan"},
{"name":"Rome","value":"rome"}]
The common option is:
<option value="yes"> yes </option>
<option value="no> no</option>
Through JS I'd like to create the select option for New York, the select option for Los Angeles etc... How can I do that? thank you in advance