Sequencing and selecting fields in JSON/search results

I am building an export function from a data collection using this article.

https://www.wix.com/velo/forum/tips-tutorials-examples/how-to-download-the-contents-of-a-data-collection-in-a-csv-file

It works fine and gives me a CSV file with all the fields/columns.

I prepended the file with “sep=,” to force comma separation.

Next step to meet my customers’ requirements is to

  1. Is there a way to set the sequence of columns in the resulting CSV file?
    I am getting some sequence, but it is neither chronological (fields that were added first do not appear first) or alphabetical or corresponding to the field sequence in the

  2. Select which columns are shown / omitted
    I think it is best to do this in the wix query, as working with the JSON result seems complex.
    Is there a way of defining which columns should be returned by search?
    Can I search in a data collection view or is there any other way to do this?
    Suggestions are very welcome, thank you.

Would a modification of the code in this tutorial (displaying an ordered search result in a table) help to define sequence and the returned fields in my csv file?