I have an object called USAFacts with properties such as StateName and objects such as State-Bird with properties about the state bird.
In JSON a record of USAFacts would look like this:
{"StateName": PA, "State-Bird": [ { "Name": Ruffed grouse, "YearDesignated": 1931, "ScientificName": "Bonasa umbellus"}]}
I can acesss the StateName property in Angular2 using
{{ USAFacts?.StateName }}
How can I access the name of the state bird? I've tried to do it like this:
{{USAFacts?.State-Bird.Name }}
but am getting an error in chrome saying cannot read property of undefined 'Name'
{{USAFacts['State-Bird'][0].Name }}