My web app returns a JSON object. I am simply trying to write the result to a page and the best I can get is 'undefined'.
<p id="demo"></p>
<script>
var text= [
{
"name": "xx",
"street": 65.2067810799497698,
"phone": 134.2967768940979501
}
];
alert(text.name)
document.getElementById("demo").innerHTML =
text.name
;
</script>
textis in square brackets - so trytext[0].name?