docs: function toArray(obj) {
      var key, val, arr = [];
      for (key in obj) {
          val = obj[key];
          if (Array.isArray(val))
              for (var i = 0; i < val.length; i++)
          arr.push([ key, val[i] ]);
          else
              arr.push([ key, val ]);
      }
      return arr;
  }