JSON:
{
  "trackResponse": {
    "shipment": [{
      "warnings": [{
        "code": "TW",
        "message": "Tracking Information Not Found"
      }]
    }]
  }
}
In that string I want to retrieve "message" information. Please let know
JSON:
{
  "trackResponse": {
    "shipment": [{
      "warnings": [{
        "code": "TW",
        "message": "Tracking Information Not Found"
      }]
    }]
  }
}
In that string I want to retrieve "message" information. Please let know
 
    
     
    
    use flatMap and Map
var data = {
  "trackResponse": {
    "shipment": [{
      "warnings": [{
        "code": "TW",
        "message": "Tracking Information Not Found"
      }]
    }]
  }
};
console.log(data.trackResponse.shipment.flatMap(i=>i.warnings.map(m=>m.message)))