
Announcements
I am working on a use case where we send an adaptive card to users with more than one device in the company, the card includes a list of all devices along with 3 options for each device. The user submits the response on the adaptive card and I'm trying to update the SharePoint list with the options the user chose for each device.
My challenge is I'm able to get the response from users in the following format
{
"P-123": "Will Return",
"P-789": "Charge to Cost Center",
"P-456": "Need Help",
"comments": "Test comment"
}
Where P-123, P789, etc are the serial numbers of the device, I want to be able to loop through each item (Dynamic because a user can have 2-3-10 devices) and update respective item on the SharePoint list with the serial number.
I'm unable to use the cardoutput to loop because its an object so I guess I need to convert the cardoutput into an array to be able to loop and capture information.
Sample: Converting the above sample
[
{
"choiceID": "P-123",
"response": "Will Return"
},
{
"choiceID": "P-789",
"response": "Charge to Cost Center"
},
{
"choiceID": "P-456",
"response": "Need Help"
},
{
"choiceID": "comments",
"response": "Test comment"
}
]
Can someone please help with this?