Parse the Firestore REST API JSON into a useable JS object
Reduced code complexity and added test coverage