我正在尝试使用来自外部 JSON 文件的数据填充 HTML 下拉菜单,该文件包含以下内容
{
"Destinations": [
{
"destinationName": "London",
"destinationID": "lon"
},
{
"destinationName": "New York",
"destinationID": "nyc"
},
{
"destinationName": "Paris",
"destinationID": "par"
},
{
"destinationName": "Rome",
"destinationID": "rom"
}
]
}
我想要的是显示目的地名称的下拉菜单,例如伦敦、纽约等,但我对如何处理这个问题感到困惑。
任何帮助表示赞赏。