This will convert it into an array (which is the JSON representation you specified):

var array = myString.split(',');

If you need the string version:

var string = JSON.stringify(array);
Answer from joeltine on Stack Overflow
🌐
OneCompiler
onecompiler.com › javascript › 3xfqsme8y
convert a json array of objects to comma separated values - JavaScript - OneCompiler
let mobiles = ["iPhone", "Samsung", "Pixel"] // accessing an array console.log(mobiles[0]) // changing an array element mobiles[3] = "Nokia"
🌐
GeeksforGeeks
geeksforgeeks.org › convert-comma-separated-string-to-array-using-javascript
JavaScript – Convert Comma Separated String To Array | GeeksforGeeks
November 26, 2024 - However, arrays are mutable, allowing you to perform operations such as adding, removing, or modifying elements. Converting a string to an array makes it easier to:Access individual characters or substrings.Perform array operations su ... Given a 2D array, we have to convert it to a comma-separated values (CSV) string using JS.
🌐
LinkedIn
linkedin.com › pulse › javascript-function-convert-comma-separated-values-string-milap-patel-1c
JavaScript Function To Convert A Comma-Separated Values String Into JSON !
August 18, 2023 - In this video, you will learn JavaScript Function To Convert A Comma-Separated Values String Into JSON ! 🔔 Subscribe for more videos like this :
🌐
Tutorial Republic
tutorialrepublic.com › faq › how-to-convert-comma-separated-string-into-an-array-in-javascript.php
How to Convert Comma Separated String into an Array in JavaScript
If separator is an empty string, the string is converted to an array of characters. The following example demonstrates how to convert a comma separated string of person name into an array and retrieve the individual name using JavaScript.
🌐
W3Resource
w3resource.com › javascript-exercises › fundamental › javascript-fundamental-exercise-4.php
JavaScript fundamental (ES6 Syntax): Convert a comma-separated values string to a 2D array of objects - w3resource
July 3, 2025 - JavaScript fundamental (ES6 Syntax) exercises, practice and solution: Write a JavaScript program to convert a comma-separated value (CSV) string to a 2D array of objects. The first row of the string is used as the title row.
🌐
Bobby Hadz
bobbyhadz.com › blog › javascript-convert-comma-separated-string-to-array
Convert a comma-separated String to an Array in JavaScript | bobbyhadz
If your string has spaces after the commas, scroll down to the next code snippet. We used the String.split() method to split a string into an array. The only argument we passed to the method is a separator.
Find elsewhere
🌐
GeeksforGeeks
geeksforgeeks.org › create-a-comma-separated-list-from-an-array-in-javascript
Create a Comma Separated List from an Array in JavaScript | GeeksforGeeks
December 28, 2024 - The code uses map(String) to convert each element of the array arr into a string, and then join(',') joins these string elements with commas. The result is a comma-separated string "1,2,3,4,5", which is logged to the console.
🌐
StackHowTo
stackhowto.com › home › web development › javascript › how to convert comma separated string into an array in javascript
How to Convert Comma Separated String into an Array In JavaScript - StackHowTo
October 12, 2021 - Youou can simply utilize the split() method of JavaScript to split a string using a particular separator, such as comma (,), space, etc. If the separator is an empty string, it is converted to an array of characters.
🌐
Medium
vijayendren-r.medium.com › javascript-react-js-function-to-convert-array-json-into-a-csv-file-8315ea8f6ab2
JavaScript(React JS) Function to convert Array/JSON into a CSV file. | by Vijayendren R | Medium
January 5, 2021 - // Function to convert the JSON(Array of objects) to CSV. const arrayToCsv = (headers, data) => { const csvRows = []; // getting headers. const headerValues = headers.map(header => header.label); csvRows.push(headerValues.join(’,’)); // Push into array as comma separated values // Getting rows. for (const row of data) { const rowValues = headers.map(header => { const escaped = (’' + row[header.key]).replace(/"/g, '\\"’); // To replace the unwanted quotes. return `"${escaped}"`; // To escape the comma in a address like string.
🌐
W3docs
w3docs.com › javascript
How to Convert a Comma-Separated String into Array
Use a comma separator in the first argument of the split method if you want to split it by comma: ... Use the limit parameter to split a string into an array and also get the individual name.
🌐
GeeksforGeeks
geeksforgeeks.org › javascript › convert-comma-separated-string-to-array-using-javascript
JavaScript - Convert Comma Separated String To Array - GeeksforGeeks
July 11, 2025 - The split() method is the simplest and most commonly used way to convert a comma-separated string into an array.
🌐
n8n
community.n8n.io › questions
Json to array comma - Questions - n8n Community
May 16, 2022 - Hello everyone. I trying to convert a json data to a string comma separated. Json is like this one: [ { "id": "625d757724acbe52634e6172", "idBoard": "625850ac4247c214ff3dc167", "name": "ANGELIS", …