I have a Nushell command:
cat airports.yaml | from yaml | sort-by "latitude_deg" | reverse | get 'latitude_deg,name' | first 20 | to json
How can I output both the name and latitude_deg fields in the table? The above does not work because it seems that get only gets a single value. I can get name and then the name is output, but was hoping to output both fields.
Here is an example record in the YAML file:
- id: '28118'
ident: VTBS
type: large_airport
name: Suvarnabhumi Airport
latitude_deg: '13.681099891662598'
longitude_deg: '100.74700164794922'
elevation_ft: '5'
continent: AS
iso_country: TH
iso_region: TH-10
municipality: Bangkok
scheduled_service: 'yes'
gps_code: VTBS
iata_code: BKK
local_code:
home_link:
wikipedia_link: http://en.wikipedia.org/wiki/Suvarnabhumi_Airport
keywords:
This works for me: