Convert string array to array in javascript

To parse it you need to use double quotes instead of single.

This should work:

services="["service1", "service2", "service3"]"
JSON.parse(services)

Leave a Comment