Column Header to JSON list

Hi Knime team.

I’m extracting column names from a table. I want to create a JSON list as seen in the example below:
“extraColumnNames”: [
Using columns or table to JSON I cant seem to get it working. Any ideas?

Hi @tiaandp
Maybe try creating a collection column before using table to JSON:
JSON_column_names.knwf (15.2 KB)

1 Like

Hi @tiaandp , I put something quickly together for you.

The workflow looks like this:

Input table looks like this:

Results look like this:

Here’s the workflow:
Column Header to JSON list.knwf (9.9 KB)


@bruno29a Thanks so much. I did not know about the collection column. I really appreciate it.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.