Hi sorry to answer so late but I was busy with many other things
Are you already using the ui-table-handler? Then there is a documentation in the help panel.
You have access to the table data in two ways
A in the global or flow context as you configure it in the subflow config.
B by sending the getTable
command to the subflow
I think I explained the process here
To get it formatted into JSON you only have to feed into a JSON node.