code: function convertObjectToNameValueArray(parameters) {
    return Object.keys(parameters).reduce((result, key) => {
      var values = parameters[key];
      if (!Array.isArray(values)) {
        values = [values];
      }
      return result.concat(
        values.map(value => {
          return {
            name: key,
            value: value
          };
        })
      );
    }, []);
  }
docs: Converts parameters {x: 'y'} into an array of {name: 'x', value: 'y'} objects.
  Converts {x: [1, 2, ...]} into multiple objects:
  {name: 'x', value: 1}, {name: 'x', value: 2}, ...
  @param  {Object} parameters eg. {a: 3, b: [6, 8]}
  @return {Object[]} eg. [{name: 'a', value: 3}, {name: 'b', value: 6}, {name: 'b', value: 8}]
  @private