Wasn’t quite sure what you were after. Probably you wanted:
iex> my_struct = %MyStruct{x: %{y: "this thing"}}
%MyStruct{x: %{y: "this thing"}}
iex> get_in(my_struct, [Access.key(:x), Access.key(:y, "my_default")])
"this thing"
Note that since :x is just a map you can do the following if you don’t need to supply a default (which you shouldn’t have to so since this is about a struct:
iex> get_in(my_struct, [Access.key(:x), :y])
"this thing"






















