-1

I have something like this in JavaScript

var stringArray = "[[1088163336,80],[1088154636,95],[1088150436,75]]"

And I need this

var array = [[1088163336,80],[1088154636,95],[1088150436,75]]; 

Help please.

arthurakay
  • 5,631
  • 8
  • 37
  • 62
  • 1
    [`JSON.parse()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse)? – Nina Scholz May 10 '16 at 20:11
  • you can use `stringArray.split(',')` in a similar way to [this solution](http://stackoverflow.com/questions/2858121/convert-comma-separated-string-to-array) – Noam Hacker May 10 '16 at 20:12

1 Answers1

0

This worked for me:

var sampleArray = JSON.parse(stringArray);
Niall Maher
  • 365
  • 1
  • 12