how to convert the following string to map so that i can access the values
data.message ="{"id":"60653","key":"project1","self":"http://127.0.0.1:321/rest/api/2/issue/project1"}"
how to convert the following string to map so that i can access the values
data.message ="{"id":"60653","key":"project1","self":"http://127.0.0.1:321/rest/api/2/issue/project1"}"
if your string is a valid JSON just use the JSON.parse
function:
var str = '{"id":"60653","key":"project1","self":"http://127.0.0.1:321/rest/api/2/issue/project1"}'
var mydata = JSON.parse(str);
Use JSON.parse
Here's the corresponding MDN documentation: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse