Please check my below answers which helps you to solved your problem:
JSONObject jsonObject = new JSONObject();
jsonObject.put("name", "abc");
jsonObject.put("email", "abc@gmail.com");
JSONArray array=new JSONArray();
for(int i=0;i<your_data.size();i++){
JSONObject obj=new JSONObject();
try {
obj.put("filterId",filter_items.get(i));
obj.put("typeName","CAT_ID");
} catch (JSONException e) {
e.printStackTrace();
}
array.put(obj);
}
And finally add json array as below
jsonObject.put("filter",array);
JsonObjectRequest request_json = new JsonObjectRequest(URL, new jsonObject,
new Response.Listener<JSONObject>() {
@Override
public void onResponse(JSONObject response) {
try {
//Process os success response
} catch (JSONException e) {
e.printStackTrace();
}
}
}, new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
VolleyLog.e("Error: ", error.getMessage());
}
});
// add the request object to the queue to be executed
ApplicationController.getInstance().addToRequestQueue(request_json);
Please check above and put your data into as a key and value, I am using my data as a request parameter.