I have an array,
const array = [
Now in this, i need to filter or fetch name=G1, and then i need to check if male is true or female is true ? And the output as Male or Female ?
I tried ;
array.filter(e => e.name === "G1" && (e.malesSeat === true || e.ladiesSeat === true))
This gives, result but how to know which is true as Male or Female ?
Male === true or just Male
As for G1, only Male is true!