(forgive me if I use slightly incorrect language - feel free to constructively correct as needed)
There are a couple posts about getting data from JSON data of siblings in the returned object, but I'm having trouble applying that information to my situation:
I have a bunch of objects that are getting returned as JSON from a REST call and for each object with a node of a certain key:value I need to extract the numeric value of a sibling node of a specific key. For example:
For the following list of objects, I need to add up the numbers in "file_size" for each object with matching "desc" and return that to matching input values on the page.
{"ResultSet":{
  Result":[
    {
        "file_size":"722694",
        "desc":"description1",
        "format":"GIF"
    },
    {
        "file_size":"19754932",
        "desc":"description1",
        "format":"JPEG"
    },
    {
        "file_size":"778174",
        "desc":"description2",
        "format":"GIF"
    },
    {
        "file_size":"244569996",
        "desc":"description1",
        "format":"PNG"
    },
    {
        "file_size":"466918",
        "desc":"description2",
        "format":"TIFF"
    }
  ]
}}
 
     
     
     
    