I am working in an Android project which involves JSON parsing into a list view.
JSON file contains one Array name with 10 sets of JSON object fields,
I have a requirement to split the first 5 sets in one activity page and another remaining 5 sets to the next activity page which should be activated when I click a button or anything to navigate.
Intent is helpful to navigate, but to split the json is complicated for me.
JSON Code
{
"Productcategory": [
{
"shop_cat_id": "1",
"shop_cat_name": "kurtis",
"shop_scat_id1": "1",
"shop_scat_id1name": "cotton kurtis",
"shop_scat_id2": "2",
"shop_scat_id2name": "Cotton Designer Kurtis",
"shop_scat_id3": "3",
"shop_scat_id3name": "soft Designer kurtis"
},
{
"shop_cat_id": "2",
"shop_cat_name": "Sarees",
"shop_scat_id1": "1",
"shop_scat_id1name": "Saree 1",
"shop_scat_id2": "2",
"shop_scat_id2name": "Saree 2",
"shop_scat_id3": "3",
"shop_scat_id3name": "Saree 4",
"shop_scat_id4": "4"
},
{
"shop_cat_id": "3",
"shop_cat_name": "Anarkkali suits",
"shop_scat_id1": "1",
"shop_scat_id1name": "Readymade",
"shop_scat_id2": "2",
"shop_scat_id2name": "Stitched",
"shop_scat_id3": "3",
"shop_scat_id3name": "Unstitched"
},
{
"shop_cat_id": "4",
"shop_cat_name": "CottonLeggins",
"shop_scat_id1": "1",
"shop_scat_id1name": "LSize",
"shop_scat_id2": "2",
"shop_scat_id2name": "XLsize",
"shop_scat_id3": "3",
"shop_scat_id3name": "3XLsize",
"shop_scat_id4": "4"
},
{
"shop_cat_id": "5",
"shop_cat_name": "PattialaPantsset"
},
{
"shop_cat_id": "6",
"shop_cat_name": "Kids'AnarkkaliSuits"
},
{
"shop_cat_id": "7",
"shop_cat_name": "Kids'AnarkkaliSuits"
},
{
"shop_cat_id": "8",
"shop_cat_name": "Kids'AnarkkaliSuits"
},
{
"shop_cat_id": "9",
"shop_cat_name": "Kids'AnarkkaliSuits"
},
{
"shop_cat_id": "10",
"shop_cat_name": "Kids'AnarkkaliSuits"
}
]
}