If you are sure that it event.bodycontains the correct data, you can parse it with json and get the value and key
JSON.parse('{"article_url": "http://technewstt.com/bd1108/"}', (key, value) => {
console.log(key);
return value;
})
which is equivalent
JSON.parse(JSON.stringify(event.body), (key, value) => {
console.log(key);
return value;
})
Another option, for example, a comment by @ Grégory NEUT, will return a URL value
JSON.parse(event.body).article_url
source
share