http://coldfusion.com logo
#lucee
Title
# lucee
s

Simone

04/18/2022, 2:54 PM
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

letskillowen

04/18/2022, 3:44 PM
looks perfect to me
also so i’m not 100% snarky, here’s an array of structs back.
return [{},{}];
s

Simone

04/18/2022, 4:02 PM
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

jumpmaster

04/18/2022, 4:55 PM
@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

Simone

04/19/2022, 1:16 PM
why, is this not a question or you are such an advanced level where only machines talk
l

letskillowen

04/19/2022, 2:36 PM
beep boop beep