Тема: Getting Json request to work


I want to provide to users a simple method to check if they have currently signup.
To achieve this i'm using a json request that will get the page and show only the elements i want.

Below is a generic json request script that i have use in the past for lists.

var xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = function() {
    if (this.readyState == 4 && this.status == 200) {
        var myObj = JSON.parse(this.responseText);
      for (x in myObj.matches) {

      document.write(''+ myObj.matches[x].ip_str +'<br>');
xmlhttp.open("GET", "https://www.example.com", true);

I want to use the code above to get the code below and only show some elements

[{"banner_type":null,"id":"2162875","campid":"8909","ip":"","subid":"","subid2":"","subid3":"","earn":"300.0","ddate":"2018-04-05","dtime":"02:36:11","ustamp":1491377771,"preid":null,"gateid":"1310615","country":"US","currency":"USD","banner_id":"0","type":"CPC"}, {"banner_type":null,"id":"2155364","campid":"10357","ip":"","subid":"","subid2":"","subid3":"","earn":"0.80","ddate":"2018-04-04","dtime":"08:29:26","ustamp":1491312566,"preid":null,"gateid":"1310615","country":"PH","currency":"USD","banner_id":"0","type":"CPC"}]

I just want to show the user some elements like ip, earn, ddate and country.



Re: Getting Json request to work

Could anyone shed some light on how to make it work?

I just need the right json method.