let a = '{"userId": 1, "id": 1, "title": "delectus aut autem", "completed": false}'; let b = JSON.parse(a); document.getElementById("divid").innerHTML = b.title; // Using fetch fetch ('https://jsonplaceholder.typicode.com/todos/1') .then(res => res.json()) .then(json => document.getElementById("divid").innerHTML = json.title);