cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ratanamar
Frequent Visitor

Difficulty in Parsing JSON below, Kindly help.. thanks !!

Hello all, 

 

I am finding it bit difficult to get the value of properties using expression under 'fields' object using Select. it is throwing an error as below, any help to fix this would be highly appreciated. I could get the value of property "id" using item().id but when I tried to get the value of property "System.WorkItemType" under fields object, flow throws an error as below.

 

JSON :

 

[
 {
"id": 180,
"rev": 4,
"fields": {
          "System.Id": 180,
          "System.WorkItemType": "Task",
          "System.Title": "Automate newly added test cases"
            },
"URL": "www.xyz.com"
},
{
"id": 205,
"rev": 3,
"fields": {
            "System.Id": 205,
            "System.WorkItemType": "Task",
            "System.Title": "Update Test suite from Baseline to Account Automation"
},
"url": "www.xyz1.com"
},

]

 

 

ratanamar_0-1611906710058.png

 

ratanamar_2-1611906971974.png

 

 

Error Details: 

 

The execution of the template action 'Select_2' failed: The evaluation of 'query' action 'where' expression '{
"ID": "@item()['id']",
"Type": "@item()['fields']['System']['WorkItemtype']"
}' failed: 'The template language expression 'item()['fields']['System']['WorkItemtype']' cannot be evaluated because property 'System' doesn't exist, available properties are 'System.Id, System.WorkItemType, System.Title'. Please see https://aka.ms/logicexpressions for usage details.'.

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
ManishJain
Solution Sage
Solution Sage

Hi @ratanamar ,

 

Please use item()?['System.WorkItemType'] to get the value.

 

Thanks

View solution in original post

2 REPLIES 2
ManishJain
Solution Sage
Solution Sage

Hi @ratanamar ,

 

Please use item()?['System.WorkItemType'] to get the value.

 

Thanks

View solution in original post

Thanks a lot, @ManishJain , this resolved my issue.. I am able to get the value using below,

 

item().fields?['System.WorkItemType']

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Users online (1,475)