Extract string from response

My response looks like this

{
    "code": 201,
    "message": "192.168.1.106/repo/api/v1/report/23",
    "type": "INFO"
}

But i only need the 23 as environment variable.
My test script looks like this what do i have to do to only get the 23?
pm.environment.set(‘DownloadLink’, pm.response.json().message);

You could take a look at the .split() JS method to get that part of the string. This will create a new array of values based on the separator provided. Then you would need to specify the item you want, this will be zero-indexed so 0 would be the first item.

For example:

let messageString = pm.response.json().message

pm.environment.set("DownloadLink", messageString.split('/')[5])

This obviously fails to extract that value is the position were to change.

Lots of different examples can be found here: