I'm trying to read the current profile of a user from an API, but the problem is that I would not known the profile id, since it is randomly generated. Is there a way to maybe skip this key and check which object has current set to true, or maybe another way?
Any help is appreciated.
{
"profiles": {
"70560fe0cdce4e9b91a0a161a257e188": {
"profile_id": "70560fe0cdce4e9b91a0a161a257e188",
"cute_name": "Pomegranate",
"current": true,
"last_save": 1632932207555,
"raw": {},
"items": {},
"data": {}
},
"b49bab4a08a64be38edec3f9ecf8f639": {
"profile_id": "b49bab4a08a64be38edec3f9ecf8f639",
"cute_name": "Raspberry",
"current": false,
"last_save": 1630180158660,
"raw": {},
"items": {},
"data": {}
}
}
}