diff --git a/packages/amplify-appsync-simulator/src/velocity/util/rds.ts b/packages/amplify-appsync-simulator/src/velocity/util/rds.ts index 790e85993b4..15c69135d21 100644 --- a/packages/amplify-appsync-simulator/src/velocity/util/rds.ts +++ b/packages/amplify-appsync-simulator/src/velocity/util/rds.ts @@ -2,16 +2,15 @@ export const rds = { toJsonString: rdsObject => { try { rdsObject = JSON.parse(rdsObject); - const rdsJson = (rdsObject?.sqlStatementResults || []).map(statement => { - return (statement?.records || []).map(record => { + const rdsJson = (rdsObject?.sqlStatementResults || []).map(statement => + (statement?.records || []).map(record => { const result = {}; record.forEach((row, index) => { result[statement.columnMetadata[index].name] = Object.values(row)[0]; }); - return result; - }); - }); + }), + ); return JSON.stringify(rdsJson); } catch { return '';