I need to make JSON like this on android -
{
    "Warp":[
        {
            "Type":"Cotton",
            "Property":"Carded",
            "Count":"10"
        },
        {
            "Type":"Cotton",
            "Property":"Carded",
            "Count":"10"
        }
    ]
}
I tried
j = new JSONObject();
j2.put("Type", "Cotton");
j2.put("Property", "Carded");
j2.put("Count", "10");
a = new JSONArray();
a.put("Warp", j2);
But looks like I cannot directly put an JSONArray inside a JSONObject like this.
Any help is appreciated.