Search code examples
jsonsteam-web-apigame-makergml

How can I find the value from json ds_map?


I am trying to get SteamAPI's SteamID value from this JSON link:

steam_request = http_get("http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=A689432685442875EBB8B6E4039D73AE&steamids=76561198074393173");
result_map = json_decode(steam_request);
steam_id = ds_map_find_value(result_map, "steamid");

When I am trying to get the string from this variable, it just tell me that this variable in undefined.


Solution

  • http_get returns an identifier, not a data. You should use this identifier in HTTP Event to get the data. Read the documentation for details