title: How to decode multidimensional JSON from external url in JS?
body: <p>I am using this API:</p>
  
  <p><a href="http://api.steampowered.com/ISteamApps/GetAppList/v0002/?format=json" rel="nofollow noreferrer">http://api.steampowered.com/ISteamApps/GetAppList/v0002/?format=json</a></p>
  
  <p>I want to search this API for name based on its id.</p>
  
  <p>In PHP it would look like this:</p>
  
  <pre><code>$id = 730; // input ID
  
  $url = 'http://api.steampowered.com/ISteamApps/GetAppList/v0002/?format=json';
  
  $content = file_get_contents($url) ;
  $data = json_decode($content, true);
  
  $key = array_search($id, array_column($data['applist']['apps'], 'appid'));
  
  echo $data['applist']['apps'][$key]['name'] // returns Counter-Strike: Global Offensive
  </code></pre>
  
  <p><strong>Is it possible to replicate this process in JS?</strong> Or am I better off creating a second PHP file and accessing it with AJAX?</p>