My current project involves making an http.get request to fetch a list of airports. The JSON response is packed with information, presenting a series of objects in the format shown below
{"id":"1","name":"Goroka","city":"Goroka","country":"Papua New Guinea","iata":"GKA","icao":"AYGA","latitude":"-6.081689","longitude":"145.391881","altitude":"5282","timezone":"10","dst":"U","tz":"Pacific/Port_Moresby"}
The task at hand is to extract the country and IATA code from this data and showcase them within a select element on my HTML page as demonstrated below
Papua New Guinea GKA
Greenland UAK
...
I've managed to generate an array of objects containing these specific details (in a factory function) and have subsequently passed it back into my array. However, I'm currently grappling with how to exhibit two distinct pieces of data in a select element.