I am looking to query a specific field in a JIRA ticket and pass the value to a variable (or output to a file).
Running a curl against a URL (see example below) gives me a large block out output in JSON format as expected:
curl -u username https://jira.abc.com/rest/api/2/search?jql=key=RLG-1234
If I use "Invoke-RestMethod" via PowerShell the output comes back in a tabular format
Invoke-RestMethod -Credential $creds -Uri https://jira.abc.com/rest/api/2/search?jql=key=RLG-1234
startAt maxResults total issues
------- ---------- ----- ------
0 50 0 {}
GetType()
IsPublic IsSerial Name BaseType
-------- -------- ---- --------
True False PSCustomObject System.ObjectPiping the output of "Invoke-RestMethod" to "Get-member -MemberType NoteProperty | Get-Member -Name issues" does not give me anything.
How do I drill down to a specific field under "issues" so that I can access its value?