take that file to excel
separate line at “:” so that variable name and value come in two columns
then sort that in excel so that all same variable name come together.
then do your thing.
combing two column to get a single line (reverse of what you did above)
bring file back to npp.
If you want original order, after taking the file to excel you can put a 3rd column and fill it will 1,2,3 serial no. for you entire data.
after first sorting, it will come to variable name order
so after finishing your data manipulation, sort again on this serial no. column and you get data in your original order.
thanks.