![]() |
#1 |
Участник
|
crmtipoftheday: Tip #1437: Duplicate property names in JSON objects in Power Automate
Источник: https://crmtipoftheday.com/1437/dupl...power-automate
============== From time to time you may be forced to deal with JSON objects in Power Automate that contain duplicate property names. Consider this object, for example: { "Id": 42, "Name": "Fixing the machine", "From": "Edison", "Total": 1000, "Items": [ { "Id": 1, "Name": "Hammering", "Subtotal": 1 }, { "Id": 2, "Name": "Knowing Where to Hammer", "Subtotal": 999 } ]} To make this object maker-friendly, the common approach is to use Parse JSON action and derive schema from the data itself. ![]() ![]() { "type": "object", "properties": { "Id": { "type": "integer", "title": "Invoice ID", "description": "Unique invoice identifier" }, "Name": { "type": "string", "title": "Invoice name" }, "From": { "type": "string" }, "Total": { "type": "integer" }, "Items": { "type": "array", "items": { "type": "object", "properties": { "Id": { "type": "integer", "title": "Invoice line item ID", "description": "Line item number unique within the invoice" }, "Name": { "type": "string", "description": "Line item name, not to be confused with invoice name" }, "Subtotal": { "type": "integer" } }, "required": [ "Id", "Name", "Subtotal" ] } } }} The result is the game changer: ![]() Cover photo by Natalia Yakovleva on Unsplash Источник: https://crmtipoftheday.com/1437/dupl...power-automate
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|
|
|