Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to Group Json Response with Keys in Java

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 70
    Answer it

     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 } ]



    if price match it should give me sizerange back like below
    I want to parse this Json into something like this.

     

     

    1

    [ { "cargoHandoverPrice": 0.00, "SizeRange": "S-XXL", }, { "cargoHandoverPrice": 1.66, "SizeRange": "M-XXXL", } ]



    How can I achieve this? My motive is to group all the size ranges according to their prices.

 0 Answer(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: