+ Start a Discussion

JSON Parsing in HTML Page


I have a HTML Page where i have a button on it , when i click on the button i am invoking a rest api from my developer account

my issue is , when i click on the button i am just getting the alert message , but when i right click the button and select inspect element i am able to see the output from my rest api

i need to parse and show it as a output on a button click in my html page for which i need help on it

Kindly help me pls

<!DOCTYPE html>
     <script type="text/javascript" src="jquery-2.1.4.min.js"></script>

      function getTasks() {

            alert("Data Loaded: " + data);
// $("#content").val(data);
	function jsonpCallback(data){
     <center> <button onclick="javascript:getTasks();">REST API </button></center>
my output :

AccountId	"00128000005yLY7AAM"

attributes	[object]
Id	"00628000004KwQ0AAK"
Name	"data-"

Help me how to parse this info in html page

Thanks in Advance