mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 11:27:09 +00:00
Add unpack helper function to frontend.
Convenience function to extract a key from an array of objects.
This commit is contained in:
4
lib/www/client/source/src/lib/unpack.js
Normal file
4
lib/www/client/source/src/lib/unpack.js
Normal file
@@ -0,0 +1,4 @@
|
||||
|
||||
export default function unpack(rows, key) {
|
||||
return rows && rows.map( row => row[key] );
|
||||
};
|
||||
Reference in New Issue
Block a user