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

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

 

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

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.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (3,116)