qDesc = queryExecute("SHOW COLUMNS FROM Items", {}, { datasource: "payfrit" }); cols = []; for (row in qDesc) { arrayAppend(cols, { "Field": row.Field, "Type": row.Type, "Null": row.Null, "Default": row.Default }); } writeOutput(serializeJSON({ "OK": true, "Columns": cols }));