Creating multi-dimensional array and retrieving values from array

Creating multi-dimensional array and retrieving values from array

Hi,
 
I have multiple elements retrieved from JSON method, which I want to add to a array and then retrieve the values from it. I am not sure, how to achieve that. My current code is as below:
 
  1. var srcs = [];
     var enumerator = this.pictures.getEnumerator();
  2.     while (enumerator.moveNext()) {
  3.         var currentItem = enumerator.get_current();
  4.         var filename = currentItem.get_item('FileLeafRef');
  5.         var dir = currentItem.get_item('FileDirRef');
  6.         var caption1 = currentItem.get_item('ImgCaption1');
  7.         var caption2 = currentItem.get_item('ImgCaption2');
  8.         var captionsubtext = currentItem.get_item('SubText');
  9. }
  10.  srcs.push(filename); // currently i have added only the filename. I would like to add caption1,caption2,captionsubtext as well to the array.
  11. addLis(srcs);
  12. }
  13. // currently only one argument is passed.

  14. function addLis(s) {

  15.     var images = s,
  16.          ul = $('#div2 > ul');

  17.     $.each(images, function (i, v) {   
            var li = $('<li><img src="' + v+ '"/></li>');

  18.         ul.append(li);
  19.     });

  20. }
 
I want to pass the other arguments as well, and create "h2" html element based on caption for each image. How to achieve that?
Thanks