To parse it you need to use double quotes instead of single.

This should work:

services = '["service1", "service2", "service3"]'
JSON.parse(services)
Answer from Erick R Soto on Stack Overflow
🌐
GeeksforGeeks
geeksforgeeks.org › javascript › string-to-array-in-javascript
JavaScript - Convert String to Array - GeeksforGeeks
August 5, 2025 - The Array.from() method can convert a string into an array of characters. This method is especially useful if you want to create an array from an iterable object, like a string, without needing to specify a separator.
Discussions

javascript - Convert string with commas to array - Stack Overflow
In this case alert shows 0,1. If it where an array, it would show 0. And if alert(array[1]) is called, it should pop-up 1 · Is there any chance to convert such string into a JavaScript array? More on stackoverflow.com
🌐 stackoverflow.com
How to convert Array formatted as String to Array?
JSON convert. var result = System.Text.Json.JsonSerializer.Deserialize(jsonString); More on reddit.com
🌐 r/learncsharp
6
5
March 22, 2023
javascript - Convert string array representation back to an array - Stack Overflow
I have a string representation of an array: '["item1", "item2", "item3"]' I'm trying to convert this back to an array. Any pointers appreciated. More on stackoverflow.com
🌐 stackoverflow.com
Converting a String to an Array
🌐 r/godot
4
6
October 24, 2023
🌐
W3Schools
w3schools.com › java › java_howto_string_to_array.asp
Java How To Convert a String to an Array
Explanation: The method toCharArray() turns the string into an array of characters.
🌐
Reddit
reddit.com › r/learncsharp › how to convert array formatted as string to array?
r/learncsharp on Reddit: How to convert Array formatted as String to Array?
March 22, 2023 -

I'm given these strings of formatted arrays

"["cat","dog","horse"]"

"[1123,1234,2345]"

How do I format them into an array such that

arr[0] = "cat" arr[1] = "dog" arr[2] = "horse"

or

arr[0] = 1123 arr[1] = 1234 arr[2] = 2345

🌐
DEV Community
dev.to › mehmehmehlol › from-string-to-array-to-string-f67
From String to Array to String - DEV Community
April 23, 2021 - But you know, at least we know Array.from() is one of the possible ways to convert string to array!
Find elsewhere
🌐
CodingNomads
codingnomads.com › javascript-array-to-string-conversion
JavaScript Array-String Conversion
The output will be: Our team members are Alice, Bob, Charlie, and Dana. Next up, you'll be checking out the .split() method, which is like the inverse of .join(). It's used to convert a string to an array.
🌐
Reddit
reddit.com › r/godot › converting a string to an array
r/godot on Reddit: Converting a String to an Array
October 24, 2023 -

I have a string that is something like ["Value1","Value2","Value3"]. I would like to convert this to an array. I'd like to know if there is an easy way to convert that is effectively an array in String format into an actual array.

I'd prefer to avoid making a big loop that inserts the values from the string into a new array with find and substr but if that's required then that can be done.

🌐
DEV Community
dev.to › sanchithasr › 6-ways-to-convert-a-string-to-an-array-in-javascript-1cjg
6 Ways to Convert a String to an Array in JavaScript - DEV Community
September 24, 2022 - Converting from string to array is always done using the split() method but after ES6, there are many tools we could do the same.
🌐
DigitalOcean
digitalocean.com › community › tutorials › string-to-array-java
How to Convert String to Array in Java | DigitalOcean
August 4, 2022 - From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.
🌐
arrayThis
arraythis.com
Online array converter; convert your text list to array | arrayThis
Instantly convert your text list to array using arrayThis online tool; valid arrays for JS, PHP, PERL, Python and much more.
🌐
W3Schools
w3schools.com › JSREF › jsref_tostring_array.asp
JavaScript Array toString() Method
The toString() method returns a string with array values separated by commas.
🌐
freeCodeCamp
freecodecamp.org › news › string-to-array-in-java-how-to-convert-a-string-to-an-array-in-java
String to Array in Java – How to Convert Strings to Arrays
July 6, 2023 - Iterate over the charArray using a for-each loop to print each character individually. ... H e l l o , W o r l d ! ... Simplicity: The toCharArray() method provides a straightforward way to convert a string to a character array with just a single ...
🌐
Scaler
scaler.com › home › topics › convert string to array in java
Convert String to Array in Java
April 19, 2024 - A Java array is an object which contains elements of a similar data type. Arrays in Java are of fixed length. *For converting a String into a character array using either a naive for loop or the toCharArray() method.
🌐
Reddit
reddit.com › r/nextjs › converting a string array into an array
r/nextjs on Reddit: Converting a String Array into an Array
August 4, 2023 -

So im trying to convert an array that was turned into a string from DynoDB. I got it formatted properly but I cant get it to work. (Incase you are wondering what this is for, its for a log keeping track of changes to a db. This is just showing the string with its state)

Here is the string:
"{PK:PHOTO01H70M6DC9YW6KPJBF15DQKDBF, SK:PHOTO01H70M6DC9YW6KPJBF15DQKDBF, type:photo, date:2023-08-02, dateRangeStart:null, dateRangeEnd:null, year:2023, featured:null, title:Title test, description:Adfsdf, linkAddress:null, location:Alberta, tags:[], people:[Free Press, School Division], bucket:bucket, region:null, key:null, filename:Screenshot 2023-07-19 at 13-44-34 Admin Add Files.png, filedesc:null, dateSK:2023-08-02#dodeyby, uploadedBy:deathbyunknown, createdAt:2023-08-04T15:55:54.644Z, updatedAt:2023-08-04T15:58:20.579Z}"

Things I've tried:
Convert using Object.entrys(), Result is an array with all the characters as a single item in the array.
JSON.parse(), Result error message: JSON.parse: expected property name or '}' at line 1 column 2 of the JSON data.

EDIT: Santizied Information that shouldn't be shown

🌐
Simplilearn
simplilearn.com › home › resources › software development › converting string to array in php using different methods
Converting String to Array in PHP Using Different Methods
September 17, 2025 - Understand the need to convert string to array in PHP and explore the complete list of methods used to convert a string to an array in PHP. Start learning now!
Address: 5851 Legacy Circle, 6th Floor, Plano, TX 75024 United States
🌐
ReqBin
reqbin.com › code › javascript › jaarxzpl › javascript-string-to-array-example
How do I convert string to array in JavaScript?
March 9, 2023 - The optional "limit" parameter specifies how many times to split the string. The array.from() method and the spread ("...") operator convert a string into an array of characters. In this JavaScript String to Array conversion ...
🌐
Board Infinity
boardinfinity.com › blog › string-to-array-conversion-in-javascript
String to Array conversion in JavaScript | Board Infinity
June 13, 2026 - There is just a single method that is quite famous and widely used in JavaScript for turning a String into an array in JS and that is the .split() method. This method divides a string into an array of other strings, using a particular character, ...
🌐
Stack Abuse
stackabuse.com › how-to-convert-a-string-to-an-array-in-javascript
How to Convert a String to an Array in JavaScript
May 22, 2023 - We've explored the split() method, ... The Spread Operator works very well in expanding strings back to arrays, and we've finally covered the Object.assign() method to assign the values of a string to an array....