There is a string that resembles the following pattern:
var stringArray = "[[1,2,3,4],[5,6,7,8]]"
The objective is to use Javascript to convert it to the following format:
var actualArray = [[1,2,3,4],[5,6,7,8]]
What would be the method to accomplish this task?