over 4 years ago
I am new to java development. I am learning JSON parsing. I got JSON response something like this.
1
"sizePrices": [ { "cargoHandoverPrice": 0.00, "sizeCode": "S", "sizeNumber": 100 }, { "cargoHandoverPrice": 1.66, "sizeCode": "M", "sizeNumber": 110 }, { "cargoHandoverPrice": 0.00, "sizeCode": "L", "sizeNumber": 120 } , { "cargoHandoverPrice": 0.00, "sizeCode": "XL", "sizeNumber": 130 }, { "cargoHandoverPrice": 0.00, "sizeCode": "XXL", "sizeNumber": 140 }, { "cargoHandoverPrice": 1.66, "sizeCode": "XXXL", "sizeNumber": 150 } ]
"sizePrices"
: [ {
"cargoHandoverPrice"
:
0.00
,
"sizeCode"
"S"
"sizeNumber"
100
}, {
1.66
"M"
110
"L"
120
} , {
"XL"
130
"XXL"
140
"XXXL"
150
} ]
if price match it should give me sizerange back like below I want to parse this Json into something like this.
[ { "cargoHandoverPrice": 0.00, "SizeRange": "S-XXL", }, { "cargoHandoverPrice": 1.66, "SizeRange": "M-XXXL", } ]
[ {
"SizeRange"
"S-XXL"
, }, {
"M-XXXL"
, } ]
How can I achieve this? My motive is to group all the size ranges according to their prices.
Starting with Chrome version 45, NPAPI is no longer supported for Google Chrome. For more information, see Chrome and NPAPI (blog.chromium.org).
Firefox and Microsoft Internet Explorer are recommended browsers for websites using java applets.
Chrome Version Support
Are you sure, you want to delete this comment?
Sign up using
0 Answer(s)