Function convertObjectToQuery

  • Convert an object to a query string.

    Usage:

    const ret = convertObjectToQuery({ t1: '1', t2: '2', t3: '3', t4: '4' });
    console.log(ret);

    Output:

    ?t1=1&t2=2&t3=3&t4=4
    

    Parameters

    • obj: {
          [key: string]: string;
      }

      The object to convert to a query string.

      • [key: string]: string

    Returns string

    The query string.