As Bergi mentions in a comment, this looks suspiciously similar to JSON (javascript object notation.) So I'll write my answer assuming that it is. For your current example to be valid JSON, it needs to be inside object-brackets like this:
{
"type": "multi",
"folders": [
"cities/",
"users/"
]
}
If you parse this:
var parsed_json = JSON.parse( json_string );
// You could add the brackets yourself if they are missing:
var parsed_json = JSON.parse('{' + json_string + '}');
Then all you have to do to get to the array:
var arr = parsed_json.folders;
console.log(arr);
And to fix the annoying trailing slashes we remap the array:
// .map calls a function for every item in an array
// And whatever you choose to return becomes the new array
arr = arr.map(function(item){
// substr returns a part of a string. Here from start (0) to end minus one (the slash).
return item.substr( 0, item.length - 1 );
// Another option could be to instead just replace all the slashes:
return item.replace( '/' , '' );
}
Now the trailing slashes are gone:
console.log( arr );