I would like to join two associations on nested keys. Is this possible?
first = {<|"away" -> <|"name" -> "bob", "money" -> 10 |>, "home" -> <|"name" -> "Sue", "money" -> 15 |>|>, <|"away" -> <|"name" -> "Joe", "money" -> 20 |>, "home" -> <|"name" -> "Jane", "money" -> 25 |>|>}
second = {<|"away" -> <|"name" -> "bob", "Sex" -> "male" |>, "home" -> <|"name" -> "Sue", "sex" -> "female"|>|>, <|"away" -> <|"name" -> "Joe", "Sex" -> "Male" |>, "home" -> <|"name" -> "Jane", "Sex" -> "Female" |>|>}
result=JoinAcross[first, second, ?? ?]
What I would like is:
result = {<|"away" -> <|"name" -> "bob", "money" -> 10, "Sex" -> "male"|>, "home" -> <|"name" -> "Sue", "money" -> 15, "sex" -> "female"|>|>, <|"away" -> <|"name" -> "Joe", "money" -> 20, "Sex" -> "Male"|>, "home" -> <|"name" -> "Jane", "money" -> 25, "Sex" -> "Female"|>|>}
It does not work on just the "away" key due to the "away" key in first and second not being exactly the same and JoinAcross[first,second,"Outer"] just yields a Join.
Is it possible to join across a nested key?
I have tried
JoinAcross[first, second, "away"]
and several variations with zero success.
Thank you.