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

149
Views
I can't get specific selected query items
// get my item
    app.get("/product", async(req, res)=>{
        const email = req.query.email;
        const query = {email}
        const cursor = productCollection.find(query)
        const product = await cursor.toArray();
        res.send(product)
    })

Here is my backend code . that call email from my client side . and I do the query for specific item I get. then I use find method from mongodb.

const [user] = useAuthState(auth)

const [items, setItems] =useState([])
const email = user?.email;
useEffect(()=>{
    const url = `http://localhost:5000/product?email=${email}`;
    fetch(url)
    .then(res=>res.json())
    .then(data=>{
        console.log(data);
        setItems(data)})

},[email])

and here is the client-side code. In this code, I collect the current user which has an email name. I basically search with email.

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!