kilerfcb
(kilerfcb)
October 7, 2020, 12:38pm
1
Hi
I will have to deserialize json files in UiPath, but I have a some problem. Example file looks like that:
{“Invoice”:{“ID”:3,“NIP”:“111-111-11-11”,“InvoiceID”:“FS 12756/2020”,“IssueDate”:“2020-09-28”,“MPK”:[{“@odata.type ”:“#Microsoft .Azure.Connectors.SharePoint.SPListExpandedReference”,“Id”:33,“Value”:“[530] Shared Services”}]}}
so I can use Deserialize JSON activity and I can read values from InvoiceID,IssueDate etc. by
variable(“Invoice”)(“IssueDate”).ToString
but if I want read (for example) value from “MPK” by variable(“Invoice”)(“MPK”)(“ID”).ToString I get error. In json file this values in How can I do it ?
Thanks for advice.
Hello @kilerfcb ,
Can you try :
variable(“Invoice”)(“MPK”)(0)(“ID”).ToString
Hi @kilerfcb
You can check this post might help you.
Could i please seek your help in extract value of “epic” from below.
{
“workingOrders”: [{
“workingOrderData”: {
“dealId”: “DIAAAADR9NCSTAT”,
“direction”: “BUY”,
“epic”: “ED.D.LHAG.CASH.IP”,
“orderSize”: 25033,
“orderLevel”: 7.7420,
“timeInForce”: “GOOD_TILL_DATE”,
“goodTillDate”: “2020/05/12 07:30”,
“goodTillDateISO”: “2020-05-12T07:30”,
“createdDate”: “2020/05/12 15:31:06:000”,
“createdDateUTC”: “2020-05-12T05:31:06”,
“guaranteedStop”: false,
“orderType”: “STOP”,
“stopDistance”…
Thanks
Latika
kilerfcb
(kilerfcb)
October 16, 2020, 12:30pm
4
I have next problem. Finally I have Json file in this format like on screenshot.
But in “InvoiceElements” section in each file may be different number of items. How can I get count of this elements ?