I am working with a JSON object that contains a large list of offerValue objects.
{
"Code": 0,
"response": "SUCCESS",
"offerValue": [
{
"id": "111",
"name": "ABC",
"flag": "V"
},
{
"id": "222",
"name": "DEF",
"flag": "A"
},
{
"id": "333",
"name": "XYZ",
"flag": "G"
},
{
"id": "444",
"name": "FER",
"flag": "H"
}
],
"sessionId": null
}
With the use of ES6, my goal is to search for an object where name is "ABC", and if found, extract the corresponding flag value ("V" in this example).