Json URL data extract in html

Last Reply 4 days ago By dharmendr

Posted 6 days ago

http://api.ipinfodb.com/v3/ip-city/?key=3b8fbb8b954ae5daad70021283f3fd56b&ip=933.207.145.193&format=json

 

How can i fetch detail from above URL as mentioned in below code, i need to get dynamic details.

 

<!DOCTYPE html>
<html>
<body>

<h2>Convert a string into a function.</h2>

<p id="demo"></p>



</body>
</html>

 

<script>

var text = '{ "name":"John", "age":"function() {return 30;}", "city":"New York"}';
var obj = JSON.parse(text);
obj.age = eval("(" + obj.age + ")");

document.getElementById("demo").innerHTML = obj.name + ", " + obj.age(); 



</script>

 

You are viewing reply posted by: fahimahmed 6 days ago.
Posted 6 days ago

facing issue with 1and1 hosting they are not allowing to use webservices thats why looking for the solution at clientside.

I agree, here is the link: https://www.e-iceblue.com/Introduce/spire-office-for-net-free.html