I have a global variable var room = {} when i create a rooms it will go there and i will have the object like this
{
'4bea542f-147c-4763-ab1c-bb6c40b1392e': {
private: false,
users: {
btrJ7946MkjFSz_zAAAA: [Object],
'qe_1igD7Q-RbDWc1AAAC': [Object]
},
gameS: false,
nextUser: 'btrJ7946MkjFSz_zAAAA',
timer: null,
round: 0,
winner: false,
alreadyGuess: [],
timerStartedAt: 0,
settings: { gameStarted: false, time: null }
},
'e6ea6785-e522-4b8c-aeb8-b2551e89c895': {
private: false,
users: {
'n5BODsuqAWb5Y-WAAAAD': [Object],
paf4cWgX08Qi_8m5AAAE: [Object]
},
gameS: false,
nextUser: 'n5BODsuqAWb5Y-WAAAAD',
timer: null,
round: 0,
winner: false,
alreadyGuess: [],
timerStartedAt: 0,
settings: { gameStarted: false, time: null }
}
}
How can i access these objects with different names like '4bea542f-147c-4763-ab1c-bb6c40b1392e' and maybe get the ones with values private = false
Object.values()Object.values(room).filter(e => e.private === false)