hoping for some help/feedback on the following error. below the error i’ve pasted the portion of my script getting the error. The script was copy/pasted from a scripting block into an automation script. i ran a compare and the script is identical to the scripting block script:
TypeError: Invalid arguments passed to output.set(key, value):
• value should be a JSON-serializable type, not undefined
- at main on line 27*
21 const query = await new_submissions.selectRecordsAsync();
22 if(query.records.length === 0) {
23 output.markdown(“No submissions to load. Done.”);
24 return;
25 }
26
27 output.markdown(Found *${query.records.length}* submissions
);
28 for(var i in query.records){
29 let r = query.records.i]
any help would be appreciated