I am new to mongodb so need some help with export and import of mongodb data with nodejs.I have a mongodb database and some collections(eg product collection,formula collection and rules collection which have reference of product id) inside it, I want to export the data from different collections based on params of api request and generate file containing the corresponding data this file will be downloaded on client browser. The exported file can be used by the user to import exported data into another db instance.Have already searched on this topic and came acros this answer not sure if i can use mongoexport for my task. Any idea how can i do that.
I have also asked on stackoverflow: https://stackoverflow.com/questions/63573995/export-mongodb-collection-data-and-import-it-back-using-node-js
Any help or idea is greatly appreciated.