It might be my ignorance but the res.json() at the moment returns a seralized json response which I would like to avoid so I can have a clean json response when calling a function
Here is my scenario:
I have created a function to first check if the document in the collection exists and if the document does not exist, it should create it (based on another function) and then return back the document. If it does exist, it simply returns the document. However when I use res.json to return the document and the relevant data, I get a serialized response which the tool I'm using (bubble.io) does not recognize as json and I would like to avoid any extra work on the FE to parse or deserialze the response. How can I use a function to return the processed document rather than relying on the database API and workarounds based on FE logic?