-1

Is there any in build function in javascript that let's me convert string "[[16, [8, 2], 4], 2, 80]" to an array of array or int [[16, [8, 2], 4], 2, 80]

3
  • 1
    JSON.pasre("[[16, [8, 2], 4], 2, 80]") Commented Feb 25, 2019 at 6:08
  • 1
    Did you try JSON.parse() ? Commented Feb 25, 2019 at 6:10
  • 1
    @brk Also this Commented Feb 25, 2019 at 6:11

1 Answer 1

1

You can use:

JSON.parse("[[16, [8, 2], 4], 2, 80]")
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.