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

Notifications

Announcements

Community site session details

Community site session details

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

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard