var aData = [ ]; var _try = 1; try{ var a= {}; v...
# lucee
s
var aData = []; var _try = 1; try{ var a= {}; var as = calltoapitoogetdata; a['count'] = as; ArrayAppend(aData,a); if(!IsArray(sData)) { _try = _try + 1; } else { return serializeJSON(aData); }
l
looks perfect to me
also so i’m not 100% snarky, here’s an array of structs back.
return [{},{}];
s
so is the if(!isArray should be a check for array of structs instead of just array or that should be ok
but how will it loop? it will not call the api back again
i think i need some kind of loop here
j
@Simone I would recommend #cfml-beginners if you are looking for help with the basics of CFML, like how to use a for loop, try/catch, etc.
1
s
why, is this not a question or you are such an advanced level where only machines talk
l
beep boop beep