I have survey data that is stored in JSON format. There are multiple versions of the same survey. One may have more questions then the other. First i do a json parse to get name/value pair columns alone with the survey name and version number. I then use a crosstab to pivot the data and finally a union to combine the multiple versions. My issue is all of the result columns (questions) are in alphabetic order. I want to maintain close to the original order.
You can add an index column and concatenate that to the column names column just before the cross tab as a prefix (e.g. "01_[Question 1]"). After cross tab, columns should be sorted "alphabetically" in the correct or desired order, then use Dynamic Rename Tool to remove the prefix (if you so desire).