Expression to get column names from a dataset

I want to populate a dropdown with the column names from a table. I have it working with python scripting but I can’t figure out how to do it using an expression. What I want to do is get the column names from one dataset into the rows of another in an expression.

why do you want to do it in the expression language if you already figured out how to do it in a python script?

you can call your script from the expression language using the expression function



As far as I know I can’t (easily) pass a dataset to the python script. I would have to either write a script for each dataset or convert the dataset to JSON or CSV and pass it as text.