简体   繁体   中英

How to get only “steamid” from AJAX(or something idk)

I've tried to only get "steamid" from AJAX(idk) link and I couldn't did it. Could you guys please help?

Link to find and get only "steamid" : here

I've tried this code:

    var xhttp = new XMLHttpRequest();
  xhttp.onreadystatechange = function() { 
    if (this.readyState == 4 && this.status == 200) {
 var ba =  this.responseText.split('\n'); var bubu = ba[ba.length-1]; console.log(ba); 
    }
  };
  xhttp.open("GET", "https://gamdom.com/user/%D0%BA%D1%94%CE%B7%CA%B8%E1%B5%98%E1%B6%A4%CB%A2%20gamdom.com.json", true);
  xhttp.send();

Check this.

fetch('https://gamdom.com/user/%E2%9C%AA%20LocalRave%20Gamdom.com.json').then((response) => response.json()).then((data) => console.log(data.user.steamid))

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM