When I print my allusers list I get this :
allusers {
2BrbqqlkVf1NSocm58qr95iL5h2: {…},
7VQMBXdTPIZZZ8ztOLx9JEeRty1: {…},
HNXrFSF3YoT07qapsz3xE9ODGp2: {…},
NwiWN3xDq3awRghWscVBEmxaclB2: {…},
P7P4Vc5hy1ZrYY9YDB5AfNIpQf2: {…},
…}
each one of the ids look like this :
2BrbbqqlkVf1NSocm58q95iL5h2: {Username: "ee", Email: "ee@gmail.com"}
I have the id stored in candidateid , how do I get the user name? I tried this:
<Button onClick={() => setchosen(candidateid)}>
<h1>{allusers.candidateid.Username}</h1>
</Button>
I also tried using .map and it doesn't work