Hi all!
Using a data table to store multiple phone numbers, separated by comma's, each row may have between 1 and 50 numbers in it.
I need help writing a response that will return 1 of those phone numbers at random, but I'm struggling to write a response that will:
- Turn the returned object(the column Local_Touch_Numbers) into an array. I assume a split function based on the comma
- Find a random number in that array and output only that in the data action
Example JSON output
{
"Local_Touch_Numbers": "7191112222, 7192223333, 7193334444, 7194445555, 7195556666",
"LastUpdate": "updated 4/29",
"key": "719"
}
current table pull
/api/v2/flows/datatables/${input.DataTableID}/rows/${input.key}?showbrief=false
Desired output from the data action would be ONLY one, but a random one of those numbers in Local_Touch_Numbers above.
Thank you!!