I have defined the variable which contains the even number of comma seperated values with NULL values and the string length varies. 

```
var a = '1, 2, 3, 4, 9, NULL':

```

How can i parse these into array like 

```
a[0] [0] = 1
a[0] [1] = 2
a[1] [0] = 3
a[2] [0] = 4
a[3] [0] = 9
a[3] [1] = NULL

```

and again convert those 

```
a[0] [0]
a[1] [0]
a[2] [0]

```

into an variable like 

```
//values of a[0] a[0], a[1] [0], a[2] [0]
test = '1,3,9'

```

using javascript.