In an application I'm creating using React Native Firebase (Although the functions are identical to the web SDK) I have an object using Firestore timestamps and am trying to think of an easy way to save it in JSON so it can be accessed offline using react-native-async-storage.
Obviously the easiest method is simply to get the seconds/ms of each Timestamp attribute and then iterate over them, getting the seconds/ms and saving this, then converting it back when the object is loaded, however there are some timestamps nested deeply in this object, so wondering if there's any best practice for this.
At this point I'm just thinking of making a method that recursively iterates over all properties on the object, but will gladly take any suggestions.
Thanks