- added form fields calculation and new table calculationl tested in preview;
This commit is contained in:
3
src/helpers/keepKeys.js
Normal file
3
src/helpers/keepKeys.js
Normal file
@@ -0,0 +1,3 @@
|
||||
const keepKeys = (arr, keys) => arr.map(obj => Object.fromEntries(keys.map(k => [k, obj[k]])));
|
||||
|
||||
export default keepKeys;
|
||||
3
src/helpers/removeKey.js
Normal file
3
src/helpers/removeKey.js
Normal file
@@ -0,0 +1,3 @@
|
||||
const removeKey = (arr, key) => arr.map(({[key]: _, ...rest}) => rest);
|
||||
|
||||
export default removeKey;
|
||||
Reference in New Issue
Block a user