let output = fruitData.filter(eachVal => {
let opt = eachVal.details.some((
{ gradingDetails }) => gradingDetails
.some(({ grade }) => grade === 'A'));
return opt;
})
console.log(output);
document.getElementById("Output").innerHTML =
JSON.stringify(output);