title: How to post params inside JsonObject using Volley
body: <p>I want to send Params in particular format to the server.</p>
  
  <p><strong>This is the format:</strong></p>
  
  <pre><code>{
                     "institute": {
                         "name": $scope.formData.institute_name,
                         "state": $scope.formData.state,
                         "city": $scope.formData.city,
                         "pin_code": $scope.formData.pincode,
                         "nature": $scope.formData.nature,
                     },
                     "user": {
                         "role": $scope.formData.role,
                         "user_id": $scope.user_id
                     }
                 };
  </code></pre>
  
  <p>And I can send in this format but the problem is a value inside <code>institute</code> and <code>user</code> is going as String. And I want value inside it also go as key and value.</p>
  
  <p>So I need to return params like <code>Map&lt;String,Map&lt;String,String&gt;&gt;</code> this</p>
  
  <p><strong>I tried this but it didn't work</strong></p>
  
  <pre><code> @Override
          protected Map&lt;String, String&gt; getParams() throws AuthFailureError {
  
              Map&lt;String, String&gt; instituteParams = new HashMap&lt;&gt;();
              instituteParams.put("name", institute);
              instituteParams.put("state", state);
              instituteParams.put("city", city);
              instituteParams.put("pin_code", pincode);
              instituteParams.put("nature", nature);
  
              JSONObject objectInstitute = new JSONObject(instituteParams);
  
              Map&lt;String, String&gt; userParams = new HashMap&lt;&gt;();
              userParams.put("role", role);
              userParams.put("user_id", userid);
  
              JSONObject objectUser = new JSONObject(userParams);
  
              Map&lt;String, String&gt; params = new HashMap&lt;&gt;();
              params.put("institute", objectInstitute.toString());
              params.put("user", objectUser.toString());
              return params;
          }
  </code></pre>