In Elixir we can get data from nested data structures using
data = %{field: %{other_field: 1}}
data[:field][:other_field]
If it contains lists it also can be done using
data = %{field: %{other_field: [1]}}
get_in data, [:field, :other_field, Access.at(0)]
But how to get that data given that data.field.other_field is a structure?
Both of the above would fail because structs don't implement Access.fetch/2.
data = %{field: %{other_field: %Struct{a: 1}}}
So what's the right way to access nested structs data other than pattern matching?