Array data in script

I have seen this asked a few times but struggling to get it to work as I expect.

I have a data action that will pull a list of contacts, sometimes there is 2 or more contacts under the same ANI (Husband and Wife)

I am trying to send this to a script as a dropdown so that when the agent answers, they can see that there are multiple records.

My thought is, to have a drop-down box that has the list found from the data action, then the agent can ask who they are chatting with, select the correct name, and now that we have the correct name, hit another data action that has the unique ID and this time pull back one match and display all the info to the agent, name, address etc

a few questions, one, is this possible? and also I can't get the drop-down to be a drop-down in the script, the list is showing in one line {item1, Item2},

I have created a list string variable and added that to options to the left of the edit list in the script, so I think I have the script correct, this is my response template, any help would be good

"translationMap": {
"lastName": "$.[].lastName",
"pbbIdentifier": "$.[
].pbbIdentifier",
"gender": "$.[].gender",
"city": "$.[
].city",
"atsiStatus": "$.[].atsiStatus",
"alert": "$.[
].alert",
"nhiNumber": "$.[].nhiNumber",
"tasRegion": "$.[
].tasRegion",
"clientRefenceNumber": "$.[].clientRefenceNumber",
"addressLine1": "$.[
].addressLine1",
"addressLine2": "$.[].addressLine2",
"addressLine3": "$.[
].addressLine3",
"state": "$.[].state",
"addressLine4": "$.[
].addressLine4",
"email": "$.[].email",
"area": "$.[
].area",
"homePhone": "$.[].homePhone",
"birthDate": "$.[
].birthDate",
"firstName": "$.[].firstName",
"mobilePhone": "$.[
].mobilePhone",
"postCode": "$.[].postCode",
"workPhone": "$.[
].workPhone",
"salutation": "$.[].clientRefenceNumber",
"interpreterRequired": "$.[
].interpreterRequired",
"uniqueId": "$.[*].uniqueId"
},
"translationMapDefaults": {},
"successTemplate": "{\r\n"uniqueId": $uniqueId,\r\n"clientRefenceNumber": $clientRefenceNumber, \r\n"salutation": $salutation, \r\n"lastName": $lastName, \r\n"firstName": $firstName, \r\n"gender": $gender, \r\n"addressLine1": $addressLine1, \r\n"addressLine2": $addressLine2, \r\n"addressLine3": $addressLine3, \r\n"addressLine4": $addressLine4, \r\n"city": $city, \r\n"state": $state, \r\n"postCode": $postCode, \r\n"homePhone": $homePhone, \r\n"mobilePhone": $mobilePhone, \r\n"workPhone": $workPhone, \r\n"birthDate": $birthDate, \r\n"atsiStatus": $atsiStatus, \r\n"email": $email, \r\n"area": $area, \r\n"interpreterRequired": $interpreterRequired, \r\n"tasRegion": $tasRegion, \r\n"pbbIdentifier": $pbbIdentifier, \r\n"nhiNumber": $nhiNumber, \r\n"alert": $alert }"

}

I would suggest asking this question in the scripts room.

--Jason

It should be possible what you are trying to achieve.

to display the name list as drop down, select the drop-down container in your script and on the right hand configuration pane change the Options drop down from List to Variable then select the List String Variable you created