Very new to this stuff, so please bear with me…
Let’s say I have an array like this:
const array1 = [
{ Temp: 1525, DewPt: 69, CP: 0.30 },
{ Temp: 1525, DewPt: 64, CP: 0.35 },
{ Temp: 1525, DewPt: 60, CP: 0.40 },
{ Temp: 1525, DewPt: 57, CP: 0.45 },
{ Temp: 1525, DewPt: 53, CP: 0.50 },
{ Temp: 1525, DewPt: 50, CP: 0.55 },
{ Temp: 1525, DewPt: 48, CP: 0.60 },
{ Temp: 1525, DewPt: 45, CP: 0.65 }
];
I want to check the first two values (Temp and DewPt) and if both match, return the CP value. From my searching, it would appear the array.includes function might be a starting point, so I tried demo’ing something like this:
console.log(array1.includes(1525 && 69));
just to see if I could get a TRUE return, but could not even get that (probably bad syntax or something).
Thanks in advance for anyone’s help.