IzumiSy / elm-firestore

*Experimental* A type-safe Firestore integration for Elm
https://package.elm-lang.org/packages/IzumiSy/elm-firestore/latest/
MIT License
14 stars 2 forks source link

Add support for decoding nested objects #40

Open DavidDTA opened 2 years ago

DavidDTA commented 2 years ago

In Firestore.Decode and Firestore.Codec, you are able to specify a decoder for a document which can decode each of its fields with the relevant decoder. However, there is no way to do this for nested objects (e.g. objects in arrays).

This would require creating a Field similar to the way that we can create a Document.

DavidDTA commented 2 years ago

The only way I can think of to work around this for now is to convert an array of objects into one array for each property.