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

144
Views
I want to fetch serviceData id like 3 data the id in the url and i want only the one record where id is 3

import React from 'react' import Servicedata from './Componants/Data/ServiceDetailsData'; import { useParams } from 'react-router-dom';

const ServiceDetails =()=> {
  const {uid} = useParams();
  {Servicedata.map(function(data,arr){
    return(
      <>
        if (data.id===uid) {
          console.log(uid)
        }
      </>
    )
  })}
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

try this

import React from 'react';
import Servicedata from './Componants/Data/ServiceDetailsData';
import { useParams } from 'react-router-dom';

const ServiceDetails = () => {
  const { uid } = useParams();
  
  return (
    <>
      {Servicedata.filter(item => item.id === uid).map(item => (
        <div key={item.id}>{item.id}</div>
      ))}
    </>
  )
}
about 4 years ago · Juan Pablo Isaza Report
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!