Unfortunately, this is the first time I’ve come across JS, so there are difficulties.
I have an array similar to this one:
{
"online": [
{
"name": "Ivan",
"id": "321-g90yy-fr91n",
"id2": 1111,
"status": "works",
"position": "editor",
"online": "yes",
"login": "ivan2022",
"Count": 2,
"Started": 1650047979
},
{
"name": "Jade",
"id": "566-t32hh-ft01n",
"id2": 3333,
"status": "works",
"position": "editor",
"online": "yes",
"login": "jade2022",
"Count": 1,
"Started": 1650017979
},
{
"name": "Georg",
"id": "123-g22tt-fr11n",
"id2": 222,
"status": "works",
"position": "editor",
"online": "yes",
"login": "georg2022",
"Count": 2,
"Started": 1650042979
}
]
}
I need to use FOR and IF to find which of the users has the minimum “Count” value, if there are multiple users with the same “Count” value then I need to find which one has the lower “Started” value and give the result “id2” and “name” without using console.log.
Any ideas how to do it?