I want to fetch 2 API lists and compare their values.
For example:
const FirstList= [{
"Games": 5
"Wis": 5
"Loses": 5
}]
const SecondList= [{
"Games": 3
"Wis": 6
"Loses": 3
}]
I want to compare these two and the one with the bigger value gets highlighted with red color.
I fetch these lists to const [list, setList] = useState([])
I don't know how to compare the values.
You can write as FirstList[0]["Games"]==SecondList[0]["Games"]