code: function prepareFormData() {
  
              var data = {},
                  matches,
                  index;
  
              for (var i in formData) {
                  if (!formData.hasOwnProperty(i)) continue;
  
                  index = 0;
                  matches = i.split(/\[(.+?)]/g);
  
                  var tmpObject = {},
                      tmpArray = [];
  
                  for (var k = matches.length - 1; k >= 0; k--) {
                      if (matches[k] === "") {
                          matches.splice(k, 1);
                          continue;
                      }
  
                      if (tmpArray.length < 1) {
                          tmpObject[matches[k]] = Number(formData[i]) || formData[i];
                      } else {
                          tmpObject = {};
                          tmpObject[matches[k]] = tmpArray[tmpArray.length - 1];
                      }
                      tmpArray.push(tmpObject)
  
                  }
  
                  data = $.extend(true, data, tmpObject);
  
              }
  
              formData = data;
  
          }
docs: Loop through formData and build an object
  
  @returns {Object} data