diff --git a/lib/lib-dynamodb/src/commands/utils.ts b/lib/lib-dynamodb/src/commands/utils.ts index 9f5eea91d60d..51aa78546496 100644 --- a/lib/lib-dynamodb/src/commands/utils.ts +++ b/lib/lib-dynamodb/src/commands/utils.ts @@ -62,7 +62,7 @@ const processObj = (obj: any, processFunc: Function, keyNodes?: KeyNodes): any = const processKeysInObj = (obj: any, processFunc: Function, keyNodes: KeyNodeChildren) => { let accumulator: any; if (Array.isArray(obj)) { - accumulator = [...obj]; + accumulator = obj.filter((item) => typeof item !== "function"); } else { accumulator = {}; for (const [k, v] of Object.entries(obj)) {