docs: function(config, data, parentKey) {
    var flatData = {};
  
    _.each(data, function(value, keyName) {
      var hash = {};
  
      // If there is a parent key, join it with
      // the current, child key.
      if (parentKey) {
        keyName = config.keyJoiner(parentKey, keyName);
      }
  
      if (_.isArray(value)) {
        keyName += '[]';
        hash[keyName] = value;
      } else if (_.isObject(value)) {
        hash = flattenData(config, value, keyName);
      } else {
        hash[keyName] = value;
      }
  
      // Store the resulting key/value pairs in the
      // final flattened data object
      _.extend(flatData, hash);
    });
  
    return flatData;
  }