Flatten in dataviewJS

Don’t know how to do flatten in dataviewJS, and actually wondered a little bit about that myself recently. However, I do know how to populate a table, and how to produce data for that table.

If you look at Dataview: Function to get length of unique values OR using nested queries - #2 by holroy, it uses dv.query() to build the data set, console.log(dayByDay) to view the structure in the developers tools windows, and finally a call to dv.table(dayByDay.value.headers, dayByDay.value.values) to produce a table based upon the query result.

I reckon going through this script, could serve as a guide as to how to build dedicated tables for population through dv.table().

Hope this helps,
Holroy

PS! Any particular reason you want to rebuild your queries into DataviewJS, if they work just fine in Dataview?