web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / List of JSON custom ob...
Power Automate
Answered

List of JSON custom objects, I can't delete or add

(0) ShareShare
ReportReport
Posted on by 6

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:

 

pad1.JPGpad3.JPGpad2.JPG

 

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

  

I have the same question (0)
  • Verified answer
    AdrianBlanco Profile Picture
    9 on at

    It can be done using a list variable,

     

    pad4.JPG

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 233

#2
David_MA Profile Picture

David_MA 217 Super User 2026 Season 1

#3
Valantis Profile Picture

Valantis 190

Last 30 days Overall leaderboard