fork download
  1. <?php
  2.  
  3. // your code goes here
  4. $json = '[
  5. [{
  6. "timestamp": 1456815458,
  7. "total_jobs": 6398,
  8. "latest_height": 99045,
  9. "jobs": {
  10. "152.62.311.2:123": [8003, "/Main:5.1/", 1655659260, 1, 395047, "ec4.ap-southeast-3.amazonaws.com", "Capetown", "AU", -317.8815, 57.5, "Australia/NSW", "AS1511", "Amazon.com, Inc."],
  11. "183.215.34.58:9805": [56734, "/JobPlace2:0.11.0/", 1455767214, 1, 399047, "185.211.134.58", "Seoul", "KR", 57.5983, 126.9783, "Asia/Seoul", "AS32665", "HCLC"]
  12. }
  13. }]
  14. ]';
  15.  
  16.  
  17.  
  18.  
  19. $decoded = json_decode($json);
  20. $jobs = $decoded[0][0]->jobs->{'152.62.311.2:123'};
  21. print_r($jobs);
Success #stdin #stdout 0.03s 52480KB
stdin
Standard input is empty
stdout
Array
(
    [0] => 8003
    [1] => /Main:5.1/
    [2] => 1655659260
    [3] => 1
    [4] => 395047
    [5] => ec4.ap-southeast-3.amazonaws.com
    [6] => Capetown
    [7] => AU
    [8] => -317.8815
    [9] => 57.5
    [10] => Australia/NSW
    [11] => AS1511
    [12] => Amazon.com, Inc.
)