Embed a table in an email

Hi All- I'm trying to write a JS query to materialize a table in an email. I'm getting an error on the map function. Any ideas?

"Change_Summary_Text_Fields_Testing" is SQL query

Try adding return formatDataAsArray (data) in the transform results section in your query.

I think ${formatDataAsArray(data).map((item) =>... would also work here but getting it right at the query level is preferred