I want to fetch only body of a comment on a jira issue but currently I'm getting whole content as -
{
"self": "url over here",
"id": "185626",
"author": {
"self": "committer username ",
"name": "name",
"key": "key",
"emailAddress": "email-id",
"avatarUrls": {
##### URLS OVER HERE #####},
"displayName": "LN, FN",
"active": true,
"timeZone": "CET"
},
"body": "Here if the actual message",
"updateAuthor": {
"self": "committer username ",
"name": "name",
"key": "key",
"emailAddress": "email-id",
"avatarUrls": {
##### URLS OVER HERE #####},
"displayName": "LN, FN",
"active": true,
"timeZone": "CET"},
"created": "2019-09-19T10:15:46.697+0200",
"updated": "2019-09-19T10:15:46.697+0200"
}
But I want to access only body from this output
How can I do it?
I don't think you can get comment body alone directly from the REST end point.
The output you shared is in JSON format. You can parse the JSON object and just extract body element value using JSON path: $.body in your script
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@dharm6619 there is no option to filter only body while making the RESP call.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You are welcome @dharm6619
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.