code: function (obj) {
      // sanity check
      if (!obj || typeof obj !== 'object') {
        return []
      }
  
      var results = []
  
      Object.keys(obj).forEach(function (name) {
        // nested values in query string
        if (typeof obj[name] === 'object') {
          obj[name].forEach(function (value) {
            results.push({
              name: name,
              value: value
            })
          })
          return
        }
  
        results.push({
          name: name,
          value: obj[name]
        })
      })
  
      return results
    }
docs: Transform objects into an array of key value pairs.