returns a list containing a property called “city”. I was expecting to then be able to say
AirportsData[<name of airport>, "city"]
However, it turns out that the property is actually called “Cities”.
So, my question is how could I have known that without actually having to grab the property and do a //FullForm? I feel I must be missing something obvious. Or, to put it another way, why does MMA return “city” instead of “cities”?
However, I still feel I am missing something. What is the benefit of Mathematica returning “city”, when I can’t actually use it to access the property?
Looking into this a bit more, I am now both intrigued and confused.
Building on Rohit’s advice, I tried using //CanonicalName on some other *Data objects such as WordData. To my surprise Mathematica returns
CanonicalName: AmericanSpelling is not an entity
…
So, there is clearly something different about AirportData and WordData.
It seems as though AirportData is a proxy object for Airport, but I am not sure how I would know that, and what that implies. I am curious to understand.
I’m a bit late to the party but in addition to what has already been suggested, another way to tell is that if you hover over a property in the output, you will see a tooltip with its input form, e.g. EntityProperty["Airport", "Cities"].