I'm currently manually itearting over document fields in firestore and putting them into an object which I stringify to JSON.
Is there a way to automate the process? Something like:
var userEnrollments = ToJson(await admin.firestore().collection(USERS + "/" + x.uid + "/" + ENROLMENT));