cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Max399
New Member

Custom object to JSON adding unnecessary ['Properties']

Hello everyone,

 

Having quite some fun with Power Automate Desktop, but have run into an issue.

I have a custom object that i get from converting JSON data to custom object that looks like this:

Max399_0-1629984122032.png

Inside orderItems there is a list of custom objects:

Max399_1-1629984202163.png

 

Once im happy with my data - i convert it back to JSON and save it to a text file.

Max399_5-1629984633329.png

When converting all this data to JSON - it adds unnecessary ['Properties'] tags to my JSON data, here is an example:

Max399_2-1629984427303.png

 

 

{"orderID":"31385","orderHEX":"FRMRNXSCH","orderPayment":"Mokėjimas e-banko sistema","orderDelivery":"Pristatyti kurjeriu","orderDelvieryCity":"Marius","orderTotalPaid":17.77,"orderTotalDiscounts":0.0,"orderTotalShipping":3.99,"orderItems":[{"Properties":{"id":"KT231","quantity":"1","price":"4.080000"}},{"Properties":{"id":"147124_KLI","quantity":"1","price":"0.370000"}},{"Properties":{"id":"143694_KLI","quantity":"1","price":"0.300000"}},{"Properties":{"id":"146948_KLI","quantity":"1","price":"0.300000"}}],"orderIsPaid":"Apmokėta"}

 

 

If i convert it again to Custom object i get this:

Max399_3-1629984521863.pngMax399_4-1629984532622.png

 

Then if i convert it again to JSON - it adds even more ['Properties'] tags, and so and beyond.

After two conversions im 3 levels deep and so on.

Is there something i am doing wrong or am i missing something?

 

4 REPLIES 4
John_Mavridis
Microsoft
Microsoft

Hello,

 

We have managed to reproduce this, that's indeed a bug - we have created the respective ticket to fix shortly.

Thank you for bringing this to our attention!

John_Mavridis
Microsoft
Microsoft

Hi @Max399 ,

 

Just letting you know that this is now fixed in the upcoming December's release, expected in the following days.

MRohanKumar
Frequent Visitor

How can I calculate how many names I have in my custom object list? If this is possible then how?

MRohanKumar_0-1645781760860.png

 

Here is DataType Properties:

https://docs.microsoft.com/en-us/power-automate/desktop-flows/datatype-properties#datatables

 

I don't see one for "Custom object" but it looks like a data table.  If that is correct, you should be able to do:

 

%orderData.RowsCount%

 

Good luck!

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,627)