So currently I have the following simple code to just build out a table for myself and look at data azure_devops_work_item_events_CL
| summarize any(WorkItemType_s, TeamProject_s, Title_s, AssignedTo_s, State_s, Reason_s) by WorkItemId_d, Relations_s
| order by WorkItemId_d desc
My problem is the Relations_s data is pulling a super long string that's different in length pretty much every instance although the format is the same for each one ex:
[ { "rel": "System.LinkTypes.Hierarchy-Reverse", "url": "https://dev.azure.com/xxxx/d88804f3-b064-4489-9705/_apis/wit/workItems/240541", "attributes": { "isLocked": false, "name": "Parent" } } ], [ { "rel": "System.LinkTypes.Hierarchy-Reverse", "url": "https://dev.azure.com/xxxx/d88804f3-b064-4489-9705/_apis/wit/workItems/240241", "attributes": { "isLocked": false, "name": "Child" } } ]
It follows that format but at times will be as many as 20 of those long strings. I have tried parsing but have been unsuccessful so far. Is there any way for me to scan Relations_s in order to pull the work item number (number at end of url that is essentially random) and name ("Child", "Parent" or whatever name appears in that spot) and have it output into a table that would be like
Child | Parent |
---|---|
240241 | 240541 |
Or at the very least get me something like this
Item | Name |
---|---|
240241 | Child |
240541 | Parent |