Customize fields returned from a query dynamically

Options
Would it be possible to customize which fields to return from a query through code?

On our front end, there's an ability to customize the fields shown.  Currently, we use dynamic SQL (SQL Server) to construct the query and dictate the fields to return.

I can do the same thing with Xano by looping through each record, then unset unwanted keys.  However, this takes a very long time.  The number of operations = number of columns hidden * number of records returned.  This requires an outer and an inner loop to achieve this.

If there's a way to customize the fields in the query result or a way to unset keys in an array (without looping through each record), it will be great.