I am trying to filter a nested Dataset.
I have some data that looks like this (curated for this example):
h = Dataset@{<|"basicData" -> <|"ID" -> "1008",
"dateMMa" -> {2014, 10, 8, 0, 0, 0.`}|>,
"away" -> <|"City" -> "montréal"|>,
"home" -> <|"City" -> "toronto"|>|>, <|"basicData" -> <|"ID" ->
"1009", "dateMMa" -> {2014, 10, 8, 1, 0, 0.`}|>,
"away" -> <|"City" -> "philadelphia"|>,
"home" -> <|"City" -> "boston"|>|>}
I would like to filter this on "dateMMA" for anything earlier than {2014, 10, 8, 1, 0, 0.`} (October 8th 2014). This should yield only one item:
<|"basicData" -> <|"ID" -> "1008", "dateMMa" -> {2014, 10, 8, 0, 0, 0.`}|>, "away" -> <|"City" -> "montréal"|>, "home" -> <|"City" -> "toronto"|>|>
This does not work:
h[[All, "basicData"]][Select[AbsoluteTime@#dateMMa > AbsoluteTime[{2014, 10, 8, 1, 0, 0.`}] &]]
Nor does this:
h[All, "basicData", Select[AbsoluteTime@#dateMMa > AbsoluteTime[{2014, 10, 8, 1, 0, 0.`}] &]]
Nor does this:
h[Select[AbsoluteTime@#dateMMa > AbsoluteTime[{2014, 10, 8, 1, 0, 0.`}] &]]
Is this type of filter/query possible?
Would there be a better way to structure this Dataset to achieve this goal?