How to merge all the columns into one column as JSON?

AmanSehgal
Honored Contributor III

I have a task to transform a dataframe.

The task is to collect all the columns in a row and embed it into a JSON string as a column.

Source DF:

imageTarget DF:

image