Reducing an array of objects to key value map

前端 未结 0 326
[愿得一人]
[愿得一人] 2020-12-24 11:51

I have an array of objects. I need to make an object so that I can fetch the name based on an id.

const drinks = [{ _id: "5fe40ad4d2e6e6de85c46a6c",         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题