I have a JSON response file of JIRA issues. I need to extract the JIRA issue key from it and store it in a variable. Below is the sample response file in which the JIRA issue key is CIJ-4
{"expand":"schema,names","startAt":0,"maxResults":50,"total":2,"issues":[{"expand":"operations,editmeta,changelog,transitions,renderedFields","id":"10100","self":"http://localhost:7080/rest/api/2/issue/10100","key":"CIJ-4","fields":{"issuetype":{"self":"http://localhost:7080/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://localhost:7080/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"components":[],"timespent":null,"timeoriginalestimate":null,"description":"Creating an issue via REST API","project":{"self":"http://localhost:7080/rest/api/2/project/10000","id":"10000","key":"CIJ","name":"CIJIRA","avatarUrls":{"48x48":"http://localhost:7080/secure/projectavatar?avatarId=10011","24x24":"http://localhost:7080/secure/projectavatar?size=small&avatarId=10011","16x16":"http://localhost:7080/secure/projectavatar?size=xsmall&avatarId=10011","32x32":"http://localhost:7080/secure/projectavatar?size=medium&avatarId=10011"}},"fixVersions":
In my example the request is CIJ-4, but as new requests gets logged in the numbers will increase CIJ-10,CIJ-100,CIJ-1000. So my challenge is how do I extract the exact JIRA issue key?
After I extract the result and store it in a file lets say result.txt, i need to parse the reuslt.txt and everytime there is a CIJ-#, i need to pass CIJ-# as a variable to another script