Textarea then process into a list then into DB

Hi, I am wondering if this works. Have a textarea, accepting a string with commas…e.g.

a, b, c, d, e

Use JS to remove spaces, split into an array by the comma. Or a textarea with a \n as a delimiter for example.

Now then how do I then insert into the Data table as JSON and vice versa out again for display as a list in a RG?

Use Text area’s value: split by()