I'm trying to check if an external API response is...
# suitescript
s
I'm trying to check if an external API response is an array or object but this code doesn't seem to work
Copy code
let response= Array.isArray(res.body)
          ? res.body
          : [res.body];
e
What's in
res.body
?
s
the response from the api
e
More specifically, what type is it? Could still be a string?
s
oh rubber duck debugging good catch
rubber duck debugging 1
all good thanx