Pluck operation over array
JS
S
JavaScriptPluck operation with the usage of map()
1const ids = suppliers.map((value: any) => value._id);
2// output [id1, id2, ...]Created on 5/29/2019
Pluck operation with the usage of map()
1const ids = suppliers.map((value: any) => value._id);
2// output [id1, id2, ...]Created on 5/29/2019