how to convert array as string into javascript array

Issue

This Content is from Stack Overflow. Question asked by Subee Na

i have a json api return string like this how to convert this string to javascript

{
 value:"[['dubai (None : None : city)', 0.0], ['(alex : NOS95H : Gender)', 123.89], ['sea (None : None : None)', 0.0], ['paint (None : None : Product)', 0.0]]"
}

i tried JSON.parse(obj.value) but getting error



Solution

This question is not yet answered, be the first one who answer using the comment. Later the confirmed answer will be published as the solution.

This Question and Answer are collected from stackoverflow and tested by JTuto community, is licensed under the terms of CC BY-SA 2.5. - CC BY-SA 3.0. - CC BY-SA 4.0.

people found this article helpful. What about you?