Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

182
Visualizações
Get UID that is outside profile on Firebase

I have been doing this for an hour. i want to get the uid for make a table, but thats not working because the UID is outside profile. this is my database Image of my DB. Image of my Console

So far I have tried this

const [data, setData] = useState({});

  useEffect(() => {
    firebase
      .database()
      .ref("user")
      .on("value", (snapshot) => {
        snapshot.forEach((child) => {
          const uid = child.key;
          firebase
            .database()
            .ref("user/" + uid + "/Profil")
            .on("value", (snapchild) => {
              snapchild.forEach((snapshotchild) => {
                if (snapshotchild.val() !== null) {
                  setData({ ...snapshotchild.val() });
                } else {
                  setData({});

and like this my table

<tbody>
        {Object.keys(data).map((id, index) => {
            return (
              <tr>
                <th scope="row">{index + 1}</th>
                <td>{data[id].fullName}</td>
                <td>

Where might I be going wrong.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda