Add unpack helper function to frontend.

Convenience function to extract a key from an
array of objects.
This commit is contained in:
D. Berge
2021-09-04 19:10:55 +02:00
parent 5c00013892
commit e212dc8b92

View File

@@ -0,0 +1,4 @@
export default function unpack(rows, key) {
return rows && rows.map( row => row[key] );
};