This is a generated response from a search server. But it generates the same response values twice (see 'prodid' of both response blocks - they are the same), instead of using nested arrays. How can I parse this into a single element. The response can vary greatly in the number of same id's and needs to be parsed into a single element for each unique id - multiple values with same id should be put into the same element.
Thanks in advance
{
"searchquery": "wide fit running shoes",
"timetaken": 1.607,
"size": 3,
"array": [{
"prodid": 902,
"prodtitle": "Naturalizer Scout Wide Open Toe Slingback Sandals Shoes Blue Womens New/Display",
"mtype": "shoe",
"expkey": "running",
"price": 75.00,
"imgurl": "http://ecx.images-amazon.com/images/I/31lStgJu2AL._SY395_.jpg",
"5count": 0,
"4count": 2,
"1count": 0,
"2count": 1,
"3count": 1,
"buyurl": "http://someurl.com"
}, {
"prodid": 902,
"prodtitle": "Naturalizer Scout Wide Open Toe Slingback Sandals Shoes Blue Womens New/Display",
"mtype": "shoe",
"expkey": "fit",
"price": 75.00,
"imgurl": "http://ecx.images-amazon.com/images/I/31lStgJu2AL._SY395_.jpg",
"5count": 0,
"4count": 16,
"1count": 0,
"2count": 14,
"3count": 14,
"buyurl": "http://someurl.com"
}]
}
For eg. prodid:902 is a single search result and needs to be shown only once - and needs to be parsed in such a way but the expkey and count values of both should be in the same element
The render looks like this right now - the values are repeating - i need it to be rendered only once, but with data from both - see expkey and Xcount in the JSON