Export data collection via JS code

Depends on what you want to do. If you want to physically export a file, like in CSV-format, look here https://www.wix.com/corvid/forum/corvid-tips-and-updates/how-to-download-the-contents-of-a-data-collection-in-a-csv-file/p- 1/dl-5e5745e242f3b900185ffbd8
If you want “live” data connectivity, go for the solution Sam offered above.