DEV Community

Cover image for Render a List from an Object in React
Aaron
Aaron

Posted on

2 1

Render a List from an Object in React

image from undraw.co

Sometimes the data we want to render in a list will be in an object rather than an array, to render it as a list we can take advantage of Object.keys so that we can map over the item like we would on a standard array.⠀

Note you could also look at using es6 Object.values or Object.entries here as well.

Check out the video below.

Head over to the reactjs.org docs for some more great examples.

Top comments (0)

Qodo Takeover

Introducing Qodo Gen 1.0: Transform Your Workflow with Agentic AI

Rather than just generating snippets, our agents understand your entire project context, can make decisions, use tools, and carry out tasks autonomously.

Read full post

Instrument, monitor, fix: a hands-on debugging session

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

Tune in to the full event

DEV is partnering to bring live events to the community. Join us or dismiss this billboard if you're not interested. ❤️