title: Want to convert a nested object to query parameter for attaching to url
body: <p>Hi I need to construct to url request with query parameter, I have a nested object with the key and values, like below </p>
  
  <pre><code> "user": {
      "first_name": "Srini",
      "last_name": "Raman",
       "gender": "male",
       "dob": "1992-08-02",
       "address_attributes": {
        "city": "San Diego",
        "state": "CA",
        "zip": 92127,
        "country": "USA",
        "latitude": 37.257009,
        "longitude": -120.050767
      }
  }
  
  
  </code></pre>
  
  <p>i need to get a query parameter like </p>
  
  <pre><code>user[first_name]=Srini&amp;user[last_name]=Raman&amp;user[address_attributes][city]=San Diego&amp;user[address_attributes][state]=CA
  </code></pre>