Tema: Json duda
Ver Mensaje Individual
  #1 (permalink)  
Antiguo 28/09/2016, 10:27
Jose789
 
Fecha de Ingreso: diciembre-2012
Ubicación: Murcia
Mensajes: 329
Antigüedad: 11 años, 4 meses
Puntos: 4
Json duda

Seria posible obtener los datos concretos que yo quiero, como por ejemplo buscar "146.185.131.86" y obtener únicamente el primer lobbies y sus correspondiente ip

Código HTML:
Ver original
  1. {
  2.     "requiredMobileVersion": 11,
  3.     "groups": [
  4.         {
  5.             "servers": [
  6.                 {
  7.                     "lobbies": [
  8.                         {
  9.                             "hash": "tiger",
  10.                             "port": 8001
  11.                         }
  12.                     ],
  13.                     "ip": "138.197.137.68"
  14.                 },
  15.                 {
  16.                     "lobbies": [
  17.                         {
  18.                             "hash": "panda",
  19.                             "port": 8002
  20.                         },
  21.                         {
  22.                             "hash": "lynx",
  23.                             "port": 8001
  24.                         }
  25.                     ],
  26.                     "ip": "138.197.129.120"
  27.                 }
  28.             ],
  29.             "pingIp": "138.197.142.68"
  30.         },
  31.         {
  32.             "servers": [
  33.                 {
  34.                     "lobbies": [
  35.                         {
  36.                             "hash": "whale",
  37.                             "port": 8002
  38.                         },
  39.                         {
  40.                             "hash": "lizard",
  41.                             "port": 8001
  42.                         }
  43.                     ],
  44.                     "ip": "46.101.117.166"
  45.                 },
  46.                 {
  47.                     "lobbies": [
  48.                         {
  49.                             "hash": "bear",
  50.                             "port": 8002
  51.                         },
  52.                         {
  53.                             "hash": "koala",
  54.                             "port": 8001
  55.                         }
  56.                     ],
  57.                     "ip": "138.68.82.170"
  58.                 },
  59.                 {
  60.                     "lobbies": [
  61.                         {
  62.                             "hash": "octopus",
  63.                             "port": 8002
  64.                         },
  65.                         {
  66.                             "hash": "scorpion",
  67.                             "port": 8001
  68.                         }
  69.                     ],
  70.                     "ip": "138.68.75.152"
  71.                 },
  72.                 {
  73.                     "lobbies": [
  74.                         {
  75.                             "hash": "glipglop",
  76.                             "port": 8002
  77.                         },
  78.                         {
  79.                             "hash": "mosquito",
  80.                             "port": 8001
  81.                         }
  82.                     ],
  83.                     "ip": "46.101.254.26"
  84.                 },
  85.                 {
  86.                     "lobbies": [
  87.                         {
  88.                             "hash": "ant",
  89.                             "port": 8001
  90.                         },
  91.                         {
  92.                             "hash": "platypus",
  93.                             "port": 8002
  94.                         }
  95.                     ],
  96.                     "ip": "46.101.241.213"
  97.                 },
  98.                 {
  99.                     "lobbies": [
  100.                         {
  101.                             "hash": "squirrel",
  102.                             "port": 8002
  103.                         }
  104.                     ],
  105.                     "ip": "138.68.66.104"
  106.                 },
  107.                 {
  108.                     "lobbies": [
  109.                         {
  110.                             "hash": "hyena",
  111.                             "port": 8001
  112.                         },
  113.                         {
  114.                             "hash": "orangutan",
  115.                             "port": 8002
  116.                         }
  117.                     ],
  118.                     "ip": "46.101.196.235"
  119.                 },
  120.                 {
  121.                     "lobbies": [
  122.                         {
  123.                             "hash": "plankton",
  124.                             "port": 8002
  125.                         },
  126.                         {
  127.                             "hash": "crab",
  128.                             "port": 8001
  129.                         }
  130.                     ],
  131.                     "ip": "46.101.203.139"
  132.                 }
  133.             ],
  134.             "pingIp": "139.59.213.108"
  135.         },
  136.         {
  137.             "servers": [
  138.                 {
  139.                     "lobbies": [
  140.                         {
  141.                             "hash": "penguin",
  142.                             "port": 8002
  143.                         },
  144.                         {
  145.                             "hash": "giraffe",
  146.                             "port": 8001
  147.                         }
  148.                     ],
  149.                     "ip": "188.166.67.134"
  150.                 },
  151.                 {
  152.                     "lobbies": [
  153.                         {
  154.                             "hash": "antelope",
  155.                             "port": 8002
  156.                         },
  157.                         {
  158.                             "hash": "toad",
  159.                             "port": 8001
  160.                         }
  161.                     ],
  162.                     "ip": "95.85.45.211"
  163.                 }
  164.             ],
  165.             "pingIp": "146.185.131.86"
  166.         },
  167.         {
  168.             "servers": [
  169.                 {
  170.                     "lobbies": [
  171.                         {
  172.                             "hash": "turtle",
  173.                             "port": 8002
  174.                         }
  175.                     ],
  176.                     "ip": "128.199.187.92"
  177.                 },
  178.                 {
  179.                     "lobbies": [
  180.                         {
  181.                             "hash": "dragon",
  182.                             "port": 8002
  183.                         }
  184.                     ],
  185.                     "ip": "188.166.245.58"
  186.                 }
  187.             ],
  188.             "pingIp": "139.59.250.29"
  189.         }
  190.     ]
  191. }
Gracias por adelantado

Última edición por Jose789; 28/09/2016 a las 10:31 Razón: codigo