Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

179
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!