How I can gen this kind of output (wp[0] in this case is an array as required for using waypoints for google directions api)
var wp = [ [