Hello I try to detect if I have same value between two keys in a String
I have a format like this
[
{array: id: idX, vote: X, description: textX},
{array: id: idX, vote: X, description: textX}
]
I would found a solution to determine the case there are best vote and case there are equal vote
case 1 there is a winner:
[
{array: id: id1, vote: 2, description: text1},
{array: id: id2, vote: 1, description: text2}
]
id1 = win => display text1
case 2 there is no winner:
[
{array: id: id1, vote: 2, description: text1},
{array: id: id2, vote: 2, description: text2}
]
id 1 & 2 = equal => wait message