Created
September 30, 2017 15:51
-
-
Save ChrisMLee/63bf0b69575ec8daed26faa70d6e1cba to your computer and use it in GitHub Desktop.
grabbing a nested "result" property
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
newtype Result = | |
Result { goalsHomeTeam :: Number | |
, goalsAwayTeam :: Number | |
} | |
newtype Fixture = | |
Fixture { _links:: LinkGroup | |
, date:: String | |
, status:: String | |
, matchday:: Number | |
, homeTeamName:: String | |
, awayTeamName:: String | |
, result :: Result | |
} | |
fixtureComponent :: forall s p i. Fixture -> H.HTML p i | |
fixtureComponent (Fixture f) = HH.div_ [ | |
HH.text f.homeTeamName | |
, HH.text f.result.goalsHomeTeam | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment