Javascript Convert String to Object(list/array)

  javascript

Problem 1: Can this be achieved in javascript?

value = "['iPhone', 'iBall']" 

to

value = ['iPhone', 'iBall']

Problem 2:
To make it harder, The values are encoded:

value = "['iPhone', 'iball']"

Source: Ask Javascript Questions

LEAVE A COMMENT