-1

Example :

Input = '[1,2,3]' // typeof string

Expected Output = [1,2,3] //typeof Array

0

1 Answer 1

1

Use JSON.parse to parse an string into an array/object

let myArray = JSON.parse(input)
Sign up to request clarification or add additional context in comments.

1 Comment

You should not do the work of user users

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.