---
title: "Discussion on \"Find an object in an array the fast way in JavaScript\" | Hashnode"
description: "Discussion on \"Find an object in an array the fast way in JavaScript\". First Method\nconst poeple = [\n  {id: 1, name: 'youssef'},\n  {id: 2, name: 'kamal'},\n  {id: 3, name: 'ossama'},\n  {id: 4, name: 'yassir'},\n];\nconst poepleById = poeple.reduce((byId, item) => {\n  byId.set(item.id, item);\n  return byId;\n}, new Map());\nc..."
url: "https://hashnode.com/posts/find-an-object-in-an-array-the-fast-way-in-javascript/618120e2d1be0d2c9b2d3c51"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Find an object in an array the fast way in JavaScript](https://youssefel.hashnode.dev/find-an-object-in-an-array-the-fast-way-in-javascript?utm_source=hashnode&utm_medium=feed)

First Method const poeple = \[ {id: 1, name: 'youssef'}, {id: 2, name: 'kamal'}, {id: 3, name: 'ossama'}, {id: 4, name: 'yassir'}, \]; const poepleById = poeple.reduce((byId, item) => { byId.set(item.id, item); return byId; }, new Map()); c...

Nov 2, 2021 · 1 min read · youssefel.hashnode.dev  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#reactjs](https://hashnode.com/tag/reactjs)
-   [#vuejs](https://hashnode.com/tag/vuejs)
-   [#expressjs-cilb5apda0066e053g7td7q24](https://hashnode.com/tag/expressjs-cilb5apda0066e053g7td7q24)
-   [#nodejs](https://hashnode.com/tag/nodejs)

## Written by

[YOUSSEF EL BEQQAL](https://hashnode.com/@YOUSSEFde)

@YOUSSEFde · Rabat, MA

  
[View profile](https://hashnode.com/@YOUSSEFde)

Full Stack Developer

I am a developer from Morocco, I am full-time JavaScript developer as my regular job i working with Node and React as my stack.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
