Guest User

Untitled

a guest
Feb 22nd, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. contact1 : {name: "Kesh", relation: "Mother", number: "9819269972"}
  2.  
  3. var obj, dbParam, xmlhttp, myObj, x, txt = "";
  4. obj = { "table":"Successful", "limit":20 };
  5. dbParam = JSON.stringify(obj);
  6. xmlhttp = new XMLHttpRequest();
  7. xmlhttp.onreadystatechange = function() {
  8. if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
  9. myObj = JSON.parse(xmlhttp.responseText);
  10. var contact1 = myObj.contact1;
  11. console.log(contact1);
  12. console.log(contact1.name);
  13. }
Add Comment
Please, Sign In to add comment