Twilio Studio HTTP Post return array length.

62 views
Skip to first unread message

Shane Elliott

unread,
Jun 5, 2020, 9:05:50 AM6/5/20
to Twilio Functions
I know this is for functions, but I have not used studio that much and this group has always helped me with my function issues so I figured I would ask.  I am building an ivr with studio as a proof of concept for something and I am making an http post to a rest endpoint and getting json back.  I need to then tell the caller the number of records in the array for example:

{
"appts": [{
"id": "8098098098",
"dateTime": 1592571526840,
"location": "Eye"
}, {
"id": "8098098098",
"dateTime": 1594990726840,
"location": "Eye"
}]
}
I need to tell the caller appts.length.  What would the liquid statement look like? OR how would I get the lenght?

thanks in advance.  

Alan

unread,
Jun 5, 2020, 10:02:26 AM6/5/20
to Twilio Functions

David Monast

unread,
Jun 5, 2020, 10:09:33 AM6/5/20
to Twilio Functions
I agree with Alan:
size - return the size of an array or string
Reply all
Reply to author
Forward
0 new messages