Here is a shorter way of achieving it:
let result = objArray.map(a => a.foo);
or
let result = objArray.map(({ foo }) => foo)
let result = objArray.map(a => a.foo);
let result = objArray.map(({ foo }) => foo)
https://ui.dev/react-router-url-parameters If you're reading this, you're probably familiar with the idea of function parameters. T...
Không có nhận xét nào:
Đăng nhận xét