Here is the structure:
cons msg=[{
 "index": 26,
 "isViewable": true
 "item": {
   "_id": 22266,
   "val": 68,
  },
 "key":"26",
},
  {
   "index": 27,
   "isViewable": true
   "item": {
     "_id": 23776,
     "val": 125,
    },
   "key":"27",
  },
  {
   "index": 28,
   "isViewable": true
   "item": {
     "_id": 24224,
     "val": 106,
    },
   "key":"28",
  },
];


Expected result:
[22266, 23776, 24224]

What is the most fashionable way?

1 Answers 1

msg.map(e=>e.item._id)