Assuming vals
has depth corresponding to dims
length:
Module[{i = -2}
, Fold[
Function[{val, dim}, Map[AssociationThread[dim -> #] &, val, {i--}]]
, vals
, Reverse @ dims
]
]
<|"New York City" -> <|"Terrace house" -> <|"Two bed" -> <|"2016" ->
0., "2017" -> 633.25|>,
"Three bed" -> <|"2016" -> 642.96, "2017" -> 677.34|>|>,
"Apartment" -> <|"Two bed" -> <|"2016" -> 591.56,
"2017" -> 632.45|>,
"Three bed" -> <|"2016" -> 634.9, "2017" -> 715.6|>|>|>|>