
Announcements
Create a custom object from a JSON. That custom object has a property that is a list of custom objects. I can iterate with a for loop, but I can't delete one of the objects in the list. I have the same error to add an object to the list. Here are some screenshots of an example:
To reproduce the example, copy and paste this into Power Automate Desktop:
Variables.ConvertJsonToCustomObject Json: $'''{
\"orderID\": \"31385\",
\"orderHEX\": \"FRMRNXSCH\",
\"orderPayment\": \"MokÄ—jimas e-banko sistema\",
\"orderDelivery\": \"Pristatyti kurjeriu\",
\"orderDelvieryCity\": \"Marius\",
\"orderTotalPaid\": 17.77,
\"orderTotalDiscounts\": 0,
\"orderTotalShipping\": 3.99,
\"orderItems\": [
{
\"id\": \"KT231\",
\"quantity\": \"1\",
\"price\": \"4.080000\"
},
{
\"id\": \"147124_KLI\",
\"quantity\": \"1\",
\"price\": \"0.370000\"
},
{
\"id\": \"143694_KLI\",
\"quantity\": \"1\",
\"price\": \"0.300000\"
},
{
\"id\": \"146948_KLI\",
\"quantity\": \"1\",
\"price\": \"0.300000\"
}
],
\"orderIsPaid\": \"ApmokÄ—ta\"
}''' CustomObject=> JsonAsCustomObject
LOOP FOREACH CurrentItem IN JsonAsCustomObject.orderItems
Display.ShowMessageDialog.ShowMessage Title: $'''Hola!''' Message: CurrentItem Icon: Display.Icon.None Buttons: Display.Buttons.OK DefaultButton: Display.DefaultButton.Button1 IsTopMost: False ButtonPressed=> ButtonPressed
Variables.RemoveItemFromList.RemoveItemFromListByValue Item: CurrentItem ItemMatchAllOccurrences: False List: JsonAsCustomObject.orderItems
END