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

164
Views
can't map through array of elements inside of an object

So I have an array object productsByVendorPaginated which contains nested array of data named objects. Here is the structure.

"productsByVendorPaginated": {
      "objects": [
        {
          "id": "d2e252ae-d0a9-4431-81ef-177c7fcacc16",
          "sellingPrice": 15000,
          "image": "http://ashewary.com/media/prod-image/1649447703.jpg"
        }
      ]
    }

Here is what I tried but I got nothing, just blank screen.

const DisplayData = datas?.productsByVendorPaginated?.objects
        ?.filter((vendors) => vendors?.id === id)
        ?.map((vendors) => {
            return (
                <div class="flex justify-evenly items-center mt-10">
                    <div
                        key={vendors.id}
                        class=" mt-10 grid sm:grid-cols-1 md:grid-cols-3 lg:grid-cols-3 xl:grid-cols-3 gap-5 "
                    >
                        <div>
                            <div>{vendors.sellingPrice}</div>
                        </div>
                    </div>
                </div>
            )
        })

What's my mistake here?

How can I map through objects array and display values in a div?

Thanks

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!