folder Tahribat.com Forumları
linefolder Html - CSS - XML - JavaScript - Ajax
linefolder [ÇÖZÜLDÜ] Nested JSON Veriyi İşlemek



[ÇÖZÜLDÜ] Nested JSON Veriyi İşlemek

  1. KısayolKısayol reportŞikayet pmÖzel Mesaj
    RockZs
    RockZs's avatar
    Kayıt Tarihi: 30/Haziran/2002
    Erkek

    Merhaba,

    Flightradar24'den aldığım bir veriyi kullanma niyetindeyim ama sitenin json olarak verdiği verinin yapısı hiç tekin değil.

    Gelen veri şu şekilde:

    {

      "arrivals": {

        "Turkey": {

          "number": {

            "airports": 7,

            "flights": 26

          },

          "airports": {

            "ADA": {

              "name": "Adana Sakirpasa Airport",

              "city": "Adana",

              "icao": "LTAF",

              "distance": 258837,

              "flights": {

                "PC1851": {

                  "utc": {

                    "2019-07-22": {

                      "aircraft": "738",

                      "time": "17:50",

                      "timestamp": 1563817800,

                      "offset": 10800

                    },

                    ....

                  }

                },...

    kodlar böyle aşağı doğru devam ediyor. Genel yapı bu. Gördüğünüz gibi bence baya karmaşık.

    Hiç array yok, veri tamamen objelerden oluşuyor.

    (Verinin tamamı: https://pastebin.com/W63qNDq2 - Veri kaynağı: https://www.flightradar24.com/data/airlines/pc-pgt/routes adresine girince gelen haritadan kıbrıs ercan havaalanını seçince alınan veri. Örnek olarak bunu aldım..)

    Bu veriden çekeceklerimi yukarıdaki kodda bold yaptım.

    Yukarıdaki kodu şuna dönüştürmek istiyorum:

    [{

      icao: "LTAF",

      distance: 258837,

      flightNumber: PC1851,

      timestamp: 1563817800

     },

    {

      icao: "LTBJ",

      distance: 666666,

      flightNumber: PC666,

      timestamp: 1563817666

     },

    ...]

    Bunu JS de bir türlü yapamadım. Veri çok karışık geldi. Önerilerinize açığım.

    Ek: İşin içine defalarca döngü içinde döngü girince konu kafamda inception gibi oluyor; 2-3. leveldan sonra mortingen strasse..

    Sevgiler.

     

    ÇÖZÜM:

    Object.keys(), Object.entries() ve Object.values() array metodları ile olayı çözdüm. Tabiki forEach döngüsünü de unutmamak lazım (NOT: IO lu asenkron döngü yapıyorsanız forEach işe yaramaz, başka yollar kullanmak lazım..).

    Kodlar değiştiği için buraya yazmıyorum ama en alttaki girdilerden birinde (@yabadabadoo) faydalandığım örnek mevcut. İlgilenen herkese çok teşekkür ederim.

    RockZs tarafından 14/Eyl/19 07:34 tarihinde düzenlenmiştir
  2. KısayolKısayol reportŞikayet pmÖzel Mesaj
    end
    end's avatar
    Kayıt Tarihi: 16/Ekim/2016

    Yardim gelmezse eve gectigimde bakacagim. :-)


    0x0480 takilin madem
  3. KısayolKısayol reportŞikayet pmÖzel Mesaj
    yabadabadoo
    yabadabadoo's avatar
    Kayıt Tarihi: 15/Temmuz/2019
    Erkek

    Pastebin linki ölü görünüyor


    Buraya daha sonra ozlu bir soz girilecek
  4. KısayolKısayol reportŞikayet pmÖzel Mesaj
    end
    end's avatar
    Kayıt Tarihi: 16/Ekim/2016
    yabadabadoo bunu yazdı

    Pastebin linki ölü görünüyor

    Herhangi bir problem yok, buraya yapıştırayım yine de.

    {
       "arrivals":{
          "Turkey":{
             "number":{
                "airports":7,
                "flights":26
             },
             "airports":{
                "ADA":{
                   "name":"Adana Sakirpasa Airport",
                   "city":"Adana",
                   "icao":"LTAF",
                   "distance":258837,
                   "flights":{
                      "PC1851":{
                         "utc":{
                            "2019-07-22":{
                               "aircraft":"738",
                               "time":"17:50",
                               "timestamp":1563817800,
                               "offset":10800
                            },
                            "2019-07-23":{
                               "aircraft":"738",
                               "time":"17:50",
                               "timestamp":1563904200,
                               "offset":10800
                            },
                            "2019-07-24":{
                               "aircraft":"738",
                               "time":"17:50",
                               "timestamp":1563990600,
                               "offset":10800
                            },
                            "2019-07-25":{
                               "aircraft":"738",
                               "time":"17:50",
                               "timestamp":1564077000,
                               "offset":10800
                            },
                            "2019-07-26":{
                               "aircraft":"738",
                               "time":"17:50",
                               "timestamp":1564163400,
                               "offset":10800
                            },
                            "2019-07-27":{
                               "aircraft":"738",
                               "time":"17:50",
                               "timestamp":1564249800,
                               "offset":10800
                            },
                            "2019-07-28":{
                               "aircraft":"738",
                               "time":"17:50",
                               "timestamp":1564336200,
                               "offset":10800
                            },
                            "2019-07-29":{
                               "aircraft":"738",
                               "time":"17:50",
                               "timestamp":1564422600,
                               "offset":10800
                            }
                         }
                      },
                      "PC1852":{
                         "utc":{
                            "2019-07-22":{
                               "aircraft":"738",
                               "time":"11:30",
                               "timestamp":1563795000,
                               "offset":10800
                            },
                            "2019-07-23":{
                               "aircraft":"738",
                               "time":"11:30",
                               "timestamp":1563881400,
                               "offset":10800
                            },
                            "2019-07-24":{
                               "aircraft":"738",
                               "time":"11:30",
                               "timestamp":1563967800,
                               "offset":10800
                            },
                            "2019-07-25":{
                               "aircraft":"738",
                               "time":"11:30",
                               "timestamp":1564054200,
                               "offset":10800
                            },
                            "2019-07-26":{
                               "aircraft":"738",
                               "time":"11:30",
                               "timestamp":1564140600,
                               "offset":10800
                            },
                            "2019-07-27":{
                               "aircraft":"738",
                               "time":"11:30",
                               "timestamp":1564227000,
                               "offset":10800
                            },
                            "2019-07-28":{
                               "aircraft":"738",
                               "time":"11:30",
                               "timestamp":1564313400,
                               "offset":10800
                            },
                            "2019-07-29":{
                               "aircraft":"738",
                               "time":"11:30",
                               "timestamp":1564399800,
                               "offset":10800
                            }
                         }
                      },
                      "PC1854":{
                         "utc":{
                            "2019-07-22":{
                               "aircraft":"738",
                               "time":"03:55",
                               "timestamp":1563767700,
                               "offset":10800
                            },
                            "2019-07-23":{
                               "aircraft":"738",
                               "time":"03:55",
                               "timestamp":1563854100,
                               "offset":10800
                            },
                            "2019-07-27":{
                               "aircraft":"738",
                               "time":"03:55",
                               "timestamp":1564199700,
                               "offset":10800
                            },
                            "2019-07-29":{
                               "aircraft":"738",
                               "time":"03:55",
                               "timestamp":1564372500,
                               "offset":10800
                            }
                         }
                      }
                   },
                   "position":{
                      "lat":"36.982159",
                      "lon":"35.280380"
                   }
                },
                "ESB":{
                   "name":"Ankara Esenboga International Airport",
                   "city":"Ankara",
                   "icao":"LTAC",
                   "distance":554739,
                   "flights":{
                      "PC1881":{
                         "utc":{
                            "2019-07-22":{
                               "aircraft":"738",
                               "time":"08:10",
                               "timestamp":1563783000,
                               "offset":10800
                            },
                            "2019-07-23":{
                               "aircraft":"738",
                               "time":"08:10",
                               "timestamp":1563869400,
                               "offset":10800
                            },
                            "2019-07-24":{
                               "aircraft":"738",
                               "time":"08:10",
                               "timestamp":1563955800,
                               "offset":10800
                            },
                            "2019-07-25":{
                               "aircraft":"738",
                               "time":"08:10",
                               "timestamp":1564042200,
                               "offset":10800
                            },
                            "2019-07-26":{
                               "aircraft":"738",
                               "time":"08:10",
                               "timestamp":1564128600,
                               "offset":10800
                            },
                            "2019-07-27":{
                               "aircraft":"738",
                               "time":"08:10",
                               "timestamp":1564215000,
                               "offset":10800
                            },
                            "2019-07-28":{
                               "aircraft":"738",
                               "time":"08:10",
                               "timestamp":1564301400,
                               "offset":10800
                            },
                            "2019-07-29":{
                               "aircraft":"738",
                               "time":"08:10",
                               "timestamp":1564387800,
                               "offset":10800
                            }
                         }
                      },
                      "PC1883":{
                         "utc":{
                            "2019-07-22":{
                               "aircraft":"738",
                               "time":"14:20",
                               "timestamp":1563805200,
                               "offset":10800
                            },
                            "2019-07-23":{
                               "aircraft":"738",
                               "time":"14:20",
                               "timestamp":1563891600,
                               "offset":10800
                            },
                            "2019-07-24":{
                               "aircraft":"738",
                               "time":"14:20",
                               "timestamp":1563978000,
                               "offset":10800
                            },
                            "2019-07-25":{
                               "aircraft":"738",
                               "time":"14:20",
                               "timestamp":1564064400,
                               "offset":10800
                            },
                            "2019-07-26":{
                               "aircraft":"738",
                               "time":"14:20",
                               "timestamp":1564150800,
                               "offset":10800
                            },
                            "2019-07-27":{
                               "aircraft":"738",
                               "time":"14:20",
                               "timestamp":1564237200,
                               "offset":10800
                            },
                            "2019-07-28":{
                               "aircraft":"738",
                               "time":"14:20",
                               "timestamp":1564323600,
                               "offset":10800
                            },
                            "2019-07-29":{
                               "aircraft":"738",
                               "time":"14:20",
                               "timestamp":1564410000,
                               "offset":10800
                            }
                         }
                      },
                      "PC1885":{
                         "utc":{
                            "2019-07-22":{
                               "aircraft":"738",
                               "time":"18:35",
                               "timestamp":1563820500,
                               "offset":10800
                            },
                            "2019-07-23":{
                               "aircraft":"738",
                               "time":"19:55",
                               "timestamp":1563911700,
                               "offset":10800
                            },
                            "2019-07-24":{
                               "aircraft":"738",
                               "time":"18:35",
                               "timestamp":1563993300,
                               "offset":10800
                            },
                            "2019-07-25":{
                               "aircraft":"738",
                               "time":"19:55",
                               "timestamp":1564084500,
                               "offset":10800
                            },
                            "2019-07-26":{
                               "aircraft":"738",
                               "time":"18:35",
                               "timestamp":1564166100,
                               "offset":10800
                            },
                            "2019-07-28":{
                               "aircraft":"738",
                               "time":"18:35",
                               "timestamp":1564338900,
                               "offset":10800
                            },
                            "2019-07-29":{
                               "aircraft":"738",
                               "time":"18:35",
                               "timestamp":1564425300,
                               "offset":10800
                            }
                         }
                      }
                   },
                   "position":{
                      "lat":"40.128078",
                      "lon":"32.995079"
                   }
                },
                "HTY":{
                   "name":"Antakya Hatay Airport",
                   "city":"Antakya",
                   "icao":"LTDA",
                   "distance":285005,
                   "flights":{
                      "PC1903":{
                         "utc":{
                            "2019-07-22":{
                               "aircraft":"738",
                               "time":"14:30",
                               "timestamp":1563805800,
                               "offset":10800
                            },
                            "2019-07-23":{
                               "aircraft":"738",
                               "time":"14:30",
                               "timestamp":1563892200,
                               "offset":10800
                            },
                            "2019-07-24":{
                               "aircraft":"738",
                               "time":"14:30",
                               "timestamp":1563978600,
                               "offset":10800
                            },
                            "2019-07-25":{
                               "aircraft":"738",
                               "time":"14:30",
                               "timestamp":1564065000,
                               "offset":10800
                            },
                            "2019-07-26":{
                               "aircraft":"320",
                               "time":"19:50",
                               "timestamp":1564170600,
                               "offset":10800
                            },
                            "2019-07-27":{
                               "aircraft":"738",
                               "time":"14:30",
                               "timestamp":1564237800,
                               "offset":10800
                            },
                            "2019-07-28":{
                               "aircraft":"320",
                               "time":"19:50",
                               "timestamp":1564343400,
                               "offset":10800
                            },
                            "2019-07-29":{
                               "aircraft":"738",
                               "time":"14:30",
                               "timestamp":1564410600,
                               "offset":10800
                            }
                         }
                      },
                      "PC1904":{
                         "utc":{
                            "2019-07-27":{
                               "aircraft":"738",
                               "time":"07:35",
                               "timestamp":1564212900,
                               "offset":10800
                            }
                         }
                      },
                      "PC1905":{
                         "utc":{
                            "2019-07-22":{
                               "aircraft":"320",
                               "time":"06:25",
                               "timestamp":1563776700,
                               "offset":10800
                            },
                            "2019-07-25":{
                               "aircraft":"320",
                               "time":"06:00",
                               "timestamp":1564034400,
                               "offset":10800
                            },
                            "2019-07-29":{
                               "aircraft":"320",
                               "time":"06:25",
                               "timestamp":1564381500,
                               "offset":10800
                            }
                         }
                      }
                   },
                   "position":{
                      "lat":"36.362778",
                      "lon":"36.282223"
                   }
                },
                "AYT":{
                   "name":"Antalya Airport",
                   "city":"Antalya",
                   "icao":"LTAI",
                   "distance":310398,
                   "flights":{
                      "PC1871":{
                         "utc":{
                            "2019-07-22":{
                               "aircraft":"320",
                               "time":"04:45",
                               "timestamp":1563770700,
                               "offset":10800
                            },
                            "2019-07-23":{
                               "aircraft":"320",
                               "time":"04:45",
                               "timestamp":1563857100,
                               "offset":10800
                            },
                            "2019-07-24":{
                               "aircraft":"320",
                               "time":"04:45",
                               "timestamp":1563943500,
                               "offset":10800
                            },
                            "2019-07-25":{
                               "aircraft":"320",
                               "time":"04:45",
                               "timestamp":1564029900,
                               "offset":10800
                            },
                            "2019-07-26":{
                               "aircraft":"320",
                               "time":"04:45",
                               "timestamp":1564116300,
                               "offset":10800
                            },
                            "2019-07-27":{
                               "aircraft":"320",
                               "time":"04:45",
                               "timestamp":1564202700,
                               "offset":10800
                            },
                            "2019-07-28":{
                               "aircraft":"320",
                               "time":"04:45",
                               "timestamp":1564289100,
                               "offset":10800
                            },
                            "2019-07-29":{
                               "aircraft":"320",
                               "time":"04:45",
                               "timestamp":1564375500,
                               "offset":10800
                            }
                         }
                      },
                      "PC1873":{
                         "utc":{
                            "2019-07-22":{
                               "aircraft":"320",
                               "time":"13:30",
                               "timestamp":1563802200,
                               "offset":10800
                            },
                            "2019-07-23":{
                               "aircraft":"320",
                               "time":"12:15",
                               "timestamp":1563884100,
                               "offset":10800
                            },
                            "2019-07-24":{
                               "aircraft":"320",
                               "time":"13:30",
                               "timestamp":1563975000,
                               "offset":10800
                            },
                            "2019-07-25":{
                               "aircraft":"320",
                               "time":"12:15",
                               "timestamp":1564056900,
                               "offset":10800
                            },
                            "2019-07-26":{
                               "aircraft":"320",
                               "time":"13:30",
                               "timestamp":1564147800,
                               "offset":10800
                            },
                            "2019-07-27":{
                               "aircraft":"320",
                               "time":"13:30",
                               "timestamp":1564234200,
                               "offset":10800
                            },
                            "2019-07-28":{
                               "aircraft":"320",
                               "time":"13:05",
                               "timestamp":1564319100,
                               "offset":10800
                            },
                            "2019-07-29":{
                               "aircraft":"320",
                               "time":"13:30",
                               "timestamp":1564407000,
                               "offset":10800
                            }
                         }
                      }
                   },
                   "position":{
                      "lat":"36.898731",
                      "lon":"30.800461"
                   }
                },
                "GZT":{
                   "name":"Gaziantep Oguzeli Airport",
                   "city":"Gaziantep",
                   "icao":"LTAJ",
                   "distance":409699,
                   "flights":{
                      "PC1891":{
                         "utc":{
                            "2019-07-22":{
                               "aircraft":"738",
                               "time":"14:40",
                               "timestamp":1563806400,
                               "offset":10800
                            },
                            "2019-07-23":{
                               "aircraft":"738",
                               "time":"14:40",
                               "timestamp":1563892800,
                               "offset":10800
                            },
                            "2019-07-24":{
                               "aircraft":"738",
                               "time":"14:40",
                               "timestamp":1563979200,
                               "offset":10800
                            },
                            "2019-07-25":{
                               "aircraft":"738",
                               "time":"14:40",
                               "timestamp":1564065600,
                               "offset":10800
                            },
                            "2019-07-26":{
                               "aircraft":"738",
                               "time":"14:40",
                               "timestamp":1564152000,
                               "offset":10800
                            },
                            "2019-07-27":{
                               "aircraft":"738",
                               "time":"14:40",
                               "timestamp":1564238400,
                               "offset":10800
                            },
                            "2019-07-28":{
                               "aircraft":"738",
                               "time":"14:40",
                               "timestamp":1564324800,
                               "offset":10800
                            },
                            "2019-07-29":{
                               "aircraft":"738",
                               "time":"14:40",
                               "timestamp":1564411200,
                               "offset":10800
                            }
                         }
                      },
                      "PC1893":{
                         "utc":{
                            "2019-07-24":{
                               "aircraft":"320",
                               "time":"06:05",
                               "timestamp":1563948300,
                               "offset":10800
                            },
                            "2019-07-27":{
                               "aircraft":"738",
                               "time":"06:55",
                               "timestamp":1564210500,
                               "offset":10800
                            }
                         }
                      }
                   },
                   "position":{
                      "lat":"36.947182",
                      "lon":"37.478680"
                   }
                },
                "SAW":{
                   "name":"Istanbul Sabiha Gokcen International Airport",
                   "city":"Istanbul",
                   "icao":"LTFJ",
                   "distance":736218,
                   "flights":{
                      "PC1896":{
                         "utc":{
                            "2019-07-27":{
                               "aircraft":"738",
                               "time":"22:45",
                               "timestamp":1564267500,
                               "offset":10800
                            }
                         }
                      },
                      "PC1898":{
                         "utc":{
                            "2019-07-22":{
                               "aircraft":"738",
                               "time":"22:30",
                               "timestamp":1563834600,
                               "offset":10800
                            },
                            "2019-07-23":{
                               "aircraft":"738",
                               "time":"22:20",
                               "timestamp":1563920400,
                               "offset":10800
                            },
                            "2019-07-24":{
                               "aircraft":"738",
                               "time":"22:30",
                               "timestamp":1564007400,
                               "offset":10800
                            },
                            "2019-07-25":{
                               "aircraft":"738",
                               "time":"22:30",
                               "timestamp":1564093800,
                               "offset":10800
                            },
                            "2019-07-26":{
                               "aircraft":"738",
                               "time":"22:30",
                               "timestamp":1564180200,
                               "offset":10800
                            },
                            "2019-07-28":{
                               "aircraft":"738",
                               "time":"22:30",
                               "timestamp":1564353000,
                               "offset":10800
                            },
                            "2019-07-29":{
                               "aircraft":"738",
                               "time":"22:30",
                               "timestamp":1564439400,
                               "offset":10800
                            }
                         }
                      },
                      "PC1912":{
                         "utc":{
                            "2019-07-22":{
                               "aircraft":"738",
                               "time":"06:25",
                               "timestamp":1563776700,
                               "offset":10800
                            },
                            "2019-07-23":{
                               "aircraft":"738",
                               "time":"06:25",
                               "timestamp":1563863100,
                               "offset":10800
                            },
                            "2019-07-24":{
                               "aircraft":"738",
                               "time":"06:25",
                               "timestamp":1563949500,
                               "offset":10800
                            },
                            "2019-07-25":{
                               "aircraft":"738",
                               "time":"06:25",
                               "timestamp":1564035900,
                               "offset":10800
                            },
                            "2019-07-26":{
                               "aircraft":"738",
                               "time":"06:25",
                               "timestamp":1564122300,
                               "offset":10800
                            },
                            "2019-07-27":{
                               "aircraft":"738",
                               "time":"06:25",
                               "timestamp":1564208700,
                               "offset":10800
                            },
                            "2019-07-28":{
                               "aircraft":"738",
                               "time":"06:25",
                               "timestamp":1564295100,
                               "offset":10800
                            },
                            "2019-07-29":{
                               "aircraft":"738",
                               "time":"06:25",
                               "timestamp":1564381500,
                               "offset":10800
                            }
                         }
                      },
                      "PC1914":{
                         "utc":{
                            "2019-07-26":{
                               "aircraft":"320",
                               "time":"18:45",
                               "timestamp":1564166700,
                               "offset":10800
                            },
                            "2019-07-28":{
                               "aircraft":"320",
                               "time":"18:45",
                               "timestamp":1564339500,
                               "offset":10800
                            }
                         }
                      },
                      "PC1916":{
                         "utc":{
                            "2019-07-22":{
                               "aircraft":"738",
                               "time":"10:55",
                               "timestamp":1563792900,
                               "offset":10800
                            },
                            "2019-07-23":{
                               "aircraft":"738",
                               "time":"10:55",
                               "timestamp":1563879300,
                               "offset":10800
                            },
                            "2019-07-24":{
                               "aircraft":"738",
                               "time":"10:55",
                               "timestamp":1563965700,
                               "offset":10800
                            },
                            "2019-07-25":{
                               "aircraft":"738",
                               "time":"10:55",
                               "timestamp":1564052100,
                               "offset":10800
                            },
                            "2019-07-26":{
                               "aircraft":"738",
                               "time":"10:55",
                               "timestamp":1564138500,
                               "offset":10800
                            },
                            "2019-07-27":{
                               "aircraft":"738",
                               "time":"10:55",
                               "timestamp":1564224900,
                               "offset":10800
                            },
                            "2019-07-28":{
                               "aircraft":"738",
                               "time":"10:55",
                               "timestamp":1564311300,
                               "offset":10800
                            },
                            "2019-07-29":{
                               "aircraft":"738",
                               "time":"10:55",
                               "timestamp":1564397700,
                               "offset":10800
                            }
                         }
                      },
                      "PC1918":{
                         "utc":{
                            "2019-07-26":{
                               "aircraft":"320",
                               "time":"16:40",
                               "timestamp":1564159200,
                               "offset":10800
                            },
                            "2019-07-28":{
                               "aircraft":"320",
                               "time":"16:45",
                               "timestamp":1564332300,
                               "offset":10800
                            }
                         }
                      },
                      "PC1920":{
                         "utc":{
                            "2019-07-22":{
                               "aircraft":"738",
                               "time":"15:50",
                               "timestamp":1563810600,
                               "offset":10800
                            },
                            "2019-07-24":{
                               "aircraft":"738",
                               "time":"16:30",
                               "timestamp":1563985800,
                               "offset":10800
                            },
                            "2019-07-25":{
                               "aircraft":"320",
                               "time":"16:00",
                               "timestamp":1564070400,
                               "offset":10800
                            },
                            "2019-07-26":{
                               "aircraft":"738",
                               "time":"15:10",
                               "timestamp":1564153800,
                               "offset":10800
                            },
                            "2019-07-27":{
                               "aircraft":"738",
                               "time":"16:15",
                               "timestamp":1564244100,
                               "offset":10800
                            },
                            "2019-07-28":{
                               "aircraft":"738",
                               "time":"15:10",
                               "timestamp":1564326600,
                               "offset":10800
                            },
                            "2019-07-29":{
                               "aircraft":"738",
                               "time":"15:50",
                               "timestamp":1564415400,
                               "offset":10800
                            }
                         }
                      },
                      "PC1932":{
                         "utc":{
                            "2019-07-22":{
                               "aircraft":"738",
                               "time":"04:50",
                               "timestamp":1563771000,
                               "offset":10800
                            },
                            "2019-07-23":{
                               "aircraft":"738",
                               "time":"04:50",
                               "timestamp":1563857400,
                               "offset":10800
                            },
                            "2019-07-24":{
                               "aircraft":"738",
                               "time":"04:50",
                               "timestamp":1563943800,
                               "offset":10800
                            },
                            "2019-07-25":{
                               "aircraft":"738",
                               "time":"04:50",
                               "timestamp":1564030200,
                               "offset":10800
                            },
                            "2019-07-26":{
                               "aircraft":"738",
                               "time":"04:50",
                               "timestamp":1564116600,
                               "offset":10800
                            },
                            "2019-07-27":{
                               "aircraft":"738",
                               "time":"04:50",
                               "timestamp":1564203000,
                               "offset":10800
                            },
                            "2019-07-28":{
                               "aircraft":"738",
                               "time":"04:50",
                               "timestamp":1564289400,
                               "offset":10800
                            },
                            "2019-07-29":{
                               "aircraft":"738",
                               "time":"04:50",
                               "timestamp":1564375800,
                               "offset":10800
                            }
                         }
                      },
                      "PC1934":{
                         "utc":{
                            "2019-07-22":{
                               "aircraft":"738",
                               "time":"19:20",
                               "timestamp":1563823200,
                               "offset":10800
                            },
                            "2019-07-23":{
                               "aircraft":"738",
                               "time":"19:20",
                               "timestamp":1563909600,
                               "offset":10800
                            },
                            "2019-07-24":{
                               "aircraft":"738",
                               "time":"19:20",
                               "timestamp":1563996000,
                               "offset":10800
                            },
                            "2019-07-25":{
                               "aircraft":"738",
                               "time":"19:20",
                               "timestamp":1564082400,
                               "offset":10800
                            },
                            "2019-07-26":{
                               "aircraft":"738",
                               "time":"19:20",
                               "timestamp":1564168800,
                               "offset":10800
                            },
                            "2019-07-27":{
                               "aircraft":"738",
                               "time":"19:20",
                               "timestamp":1564255200,
                               "offset":10800
                            },
                            "2019-07-28":{
                               "aircraft":"738",
                               "time":"19:20",
                               "timestamp":1564341600,
                               "offset":10800
                            },
                            "2019-07-29":{
                               "aircraft":"738",
                               "time":"19:20",
                               "timestamp":1564428000,
                               "offset":10800
                            }
                         }
                      },
                      "PC7280":{
                         "utc":{
                            "2019-07-23":{
                               "aircraft":"738",
                               "time":"18:05",
                               "timestamp":1563905100,
                               "offset":10800
                            }
                         }
                      }
                   },
                   "position":{
                      "lat":"40.898548",
                      "lon":"29.309210"
                   }
                },
                "ADB":{
                   "name":"Izmir Adnan Menderes International Airport",
                   "city":"Izmir",
                   "icao":"LTBJ",
                   "distance":663748,
                   "flights":{
                      "PC1860":{
                         "utc":{
                            "2019-07-22":{
                               "aircraft":"738",
                               "time":"04:20",
                               "timestamp":1563769200,
                               "offset":10800
                            },
                            "2019-07-23":{
                               "aircraft":"738",
                               "time":"04:20",
                               "timestamp":1563855600,
                               "offset":10800
                            },
                            "2019-07-24":{
                               "aircraft":"738",
                               "time":"04:20",
                               "timestamp":1563942000,
                               "offset":10800
                            },
                            "2019-07-25":{
                               "aircraft":"738",
                               "time":"04:20",
                               "timestamp":1564028400,
                               "offset":10800
                            },
                            "2019-07-26":{
                               "aircraft":"738",
                               "time":"04:20",
                               "timestamp":1564114800,
                               "offset":10800
                            },
                            "2019-07-27":{
                               "aircraft":"738",
                               "time":"04:20",
                               "timestamp":1564201200,
                               "offset":10800
                            },
                            "2019-07-28":{
                               "aircraft":"738",
                               "time":"03:55",
                               "timestamp":1564286100,
                               "offset":10800
                            },
                            "2019-07-29":{
                               "aircraft":"738",
                               "time":"04:20",
                               "timestamp":1564374000,
                               "offset":10800
                            }
                         }
                      },
                      "PC1862":{
                         "utc":{
                            "2019-07-22":{
                               "aircraft":"738",
                               "time":"18:15",
                               "timestamp":1563819300,
                               "offset":10800
                            },
                            "2019-07-23":{
                               "aircraft":"738",
                               "time":"18:25",
                               "timestamp":1563906300,
                               "offset":10800
                            },
                            "2019-07-24":{
                               "aircraft":"738",
                               "time":"18:15",
                               "timestamp":1563992100,
                               "offset":10800
                            },
                            "2019-07-25":{
                               "aircraft":"738",
                               "time":"18:15",
                               "timestamp":1564078500,
                               "offset":10800
                            },
                            "2019-07-26":{
                               "aircraft":"738",
                               "time":"18:15",
                               "timestamp":1564164900,
                               "offset":10800
                            },
                            "2019-07-27":{
                               "aircraft":"738",
                               "time":"18:15",
                               "timestamp":1564251300,
                               "offset":10800
                            },
                            "2019-07-28":{
                               "aircraft":"738",
                               "time":"18:25",
                               "timestamp":1564338300,
                               "offset":10800
                            },
                            "2019-07-29":{
                               "aircraft":"738",
                               "time":"18:15",
                               "timestamp":1564424100,
                               "offset":10800
                            }
                         }
                      },
                      "PC1864":{
                         "utc":{
                            "2019-07-23":{
                               "aircraft":"738",
                               "time":"09:15",
                               "timestamp":1563873300,
                               "offset":10800
                            },
                            "2019-07-26":{
                               "aircraft":"738",
                               "time":"12:35",
                               "timestamp":1564144500,
                               "offset":10800
                            },
                            "2019-07-28":{
                               "aircraft":"738",
                               "time":"14:15",
                               "timestamp":1564323300,
                               "offset":10800
                            }
                         }
                      }
                   },
                   "position":{
                      "lat":"38.292389",
                      "lon":"27.156950"
                   }
                }
             }
          }
       },
       "departures":{
          "Turkey":{
             "number":{
                "airports":7,
                "flights":27
             },
             "airports":{
                "ADA":{
                   "name":"Adana Sakirpasa Airport",
                   "city":"Adana",
                   "icao":"LTAF",
                   "distance":258837,
                   "flights":{
                      "PC1850":{
                         "utc":{
                            "2019-07-22":{
                               "aircraft":"738",
                               "time":"15:35",
                               "timestamp":1563809700,
                               "offset":10800
                            },
                            "2019-07-23":{
                               "aircraft":"738",
                               "time":"15:35",
                               "timestamp":1563896100,
                               "offset":10800
                            },
                            "2019-07-24":{
                               "aircraft":"738",
                               "time":"15:35",
                               "timestamp":1563982500,
                               "offset":10800
                            },
                            "2019-07-25":{
                               "aircraft":"738",
                               "time":"15:35",
                               "timestamp":1564068900,
                               "offset":10800
                            },
                            "2019-07-26":{
                               "aircraft":"738",
                               "time":"15:35",
                               "timestamp":1564155300,
                               "offset":10800
                            },
                            "2019-07-27":{
                               "aircraft":"738",
                               "time":"15:35",
                               "timestamp":1564241700,
                               "offset":10800
                            },
                            "2019-07-28":{
                               "aircraft":"738",
                               "time":"15:35",
                               "timestamp":1564328100,
                               "offset":10800
                            },
                            "2019-07-29":{
                               "aircraft":"738",
                               "time":"15:35",
                               "timestamp":1564414500,
                               "offset":10800
                            }
                         }
                      },
                      "PC1853":{
                         "utc":{
                            "2019-07-22":{
                               "aircraft":"738",
                               "time":"09:15",
                               "timestamp":1563786900,
                               "offset":10800
                            },
                            "2019-07-23":{
                               "aircraft":"738",
                               "time":"09:15",
                               "timestamp":1563873300,
                               "offset":10800
                            },
                            "2019-07-24":{
                               "aircraft":"738",
                               "time":"09:15",
                               "timestamp":1563959700,
                               "offset":10800
                            },
                            "2019-07-25":{
                               "aircraft":"738",
                               "time":"09:15",
                               "timestamp":1564046100,
                               "offset":10800
                            },
                            "2019-07-26":{
                               "aircraft":"738",
                               "time":"09:15",
                               "timestamp":1564132500,
                               "offset":10800
                            },
                            "2019-07-27":{
                               "aircraft":"738",
                               "time":"09:15",
                               "timestamp":1564218900,
                               "offset":10800
                            },
                            "2019-07-28":{
                               "aircraft":"738",
                               "time":"09:15",
                               "timestamp":1564305300,
                               "offset":10800
                            },
                            "2019-07-29":{
                               "aircraft":"738",
                               "time":"09:15",
                               "timestamp":1564391700,
                               "offset":10800
                            }
                         }
                      },
                      "PC1855":{
                         "utc":{
                            "2019-07-22":{
                               "aircraft":"738",
                               "time":"04:20",
                               "timestamp":1563769200,
                               "offset":10800
                            },
                            "2019-07-23":{
                               "aircraft":"738",
                               "time":"04:20",
                               "timestamp":1563855600,
                               "offset":10800
                            },
                            "2019-07-27":{
                               "aircraft":"738",
                               "time":"04:20",
                               "timestamp":1564201200,
                               "offset":10800
                            },
                            "2019-07-29":{
                               "aircraft":"738",
                               "time":"04:20",
                               "timestamp":1564374000,
                               "offset":10800
                            }
                         }
                      }
                   },
                   "position":{
                      "lat":"36.982159",
                      "lon":"35.280380"
                   }
                },
                "ESB":{
                   "name":"Ankara Esenboga International Airport",
                   "city":"Ankara",
                   "icao":"LTAC",
                   "distance":554739,
                   "flights":{
                      "PC1880":{
                         "utc":{
                            "2019-07-22":{
                               "aircraft":"738",
                               "time":"05:20",
                               "timestamp":1563772800,
                               "offset":10800
                            },
                            "2019-07-23":{
                               "aircraft":"738",
                               "time":"05:20",
                               "timestamp":1563859200,
                               "offset":10800
                            },
                            "2019-07-24":{
                               "aircraft":"738",
                               "time":"05:20",
                               "timestamp":1563945600,
                               "offset":10800
                            },
                            "2019-07-25":{
                               "aircraft":"738",
                               "time":"05:20",
                               "timestamp":1564032000,
                               "offset":10800
                            },
                            "2019-07-26":{
                               "aircraft":"738",
                               "time":"05:20",
                               "timestamp":1564118400,
                               "offset":10800
                            },
                            "2019-07-27":{
                               "aircraft":"738",
                               "time":"05:20",
                               "timestamp":1564204800,
                               "offset":10800
                            },
                            "2019-07-28":{
                               "aircraft":"738",
                               "time":"05:20",
                               "timestamp":1564291200,
                               "offset":10800
                            },
                            "2019-07-29":{
                               "aircraft":"738",
                               "time":"05:20",
                               "timestamp":1564377600,
                               "offset":10800
                            }
                         }
                      },
                      "PC1882":{
                         "utc":{
                            "2019-07-22":{
                               "aircraft":"738",
                               "time":"14:45",
                               "timestamp":1563806700,
                               "offset":10800
                            },
                            "2019-07-23":{
                               "aircraft":"738",
                               "time":"14:45",
                               "timestamp":1563893100,
                               "offset":10800
                            },
                            "2019-07-24":{
                               "aircraft":"738",
                               "time":"14:45",
                               "timestamp":1563979500,
                               "offset":10800
                            },
                            "2019-07-25":{
                               "aircraft":"738",
                               "time":"14:45",
                               "timestamp":1564065900,
                               "offset":10800
                            },
                            "2019-07-26":{
                               "aircraft":"738",
                               "time":"14:45",
                               "timestamp":1564152300,
                               "offset":10800
                            },
                            "2019-07-27":{
                               "aircraft":"738",
                               "time":"14:45",
                               "timestamp":1564238700,
                               "offset":10800
                            },
                            "2019-07-28":{
                               "aircraft":"738",
                               "time":"14:45",
                               "timestamp":1564325100,
                               "offset":10800
                            },
                            "2019-07-29":{
                               "aircraft":"738",
                               "time":"14:45",
                               "timestamp":1564411500,
                               "offset":10800
                            }
                         }
                      },
                      "PC1884":{
                         "utc":{
                            "2019-07-22":{
                               "aircraft":"738",
                               "time":"19:00",
                               "timestamp":1563822000,
                               "offset":10800
                            },
                            "2019-07-23":{
                               "aircraft":"738",
                               "time":"20:20",
                               "timestamp":1563913200,
                               "offset":10800
                            },
                            "2019-07-24":{
                               "aircraft":"738",
                               "time":"19:00",
                               "timestamp":1563994800,
                               "offset":10800
                            },
                            "2019-07-25":{
                               "aircraft":"738",
                               "time":"20:20",
                               "timestamp":1564086000,
                               "offset":10800
                            },
                            "2019-07-26":{
                               "aircraft":"738",
                               "time":"19:00",
                               "timestamp":1564167600,
                               "offset":10800
                            },
                            "2019-07-28":{
                               "aircraft":"738",
                               "time":"19:00",
                               "timestamp":1564340400,
                               "offset":10800
                            },
                            "2019-07-29":{
                               "aircraft":"738",
                               "time":"19:00",
                               "timestamp":1564426800,
                               "offset":10800
                            }
                         }
                      }
                   },
                   "position":{
                      "lat":"40.128078",
                      "lon":"32.995079"
                   }
                },
                "HTY":{
                   "name":"Antakya Hatay Airport",
                   "city":"Antakya",
                   "icao":"LTDA",
                   "distance":285005,
                   "flights":{
                      "PC1902":{
                         "utc":{
                            "2019-07-22":{
                               "aircraft":"738",
                               "time":"12:05",
                               "timestamp":1563797100,
                               "offset":10800
                            },
                            "2019-07-23":{
                               "aircraft":"738",
                               "time":"12:05",
                               "timestamp":1563883500,
                               "offset":10800
                            },
                            "2019-07-24":{
                               "aircraft":"738",
                               "time":"12:05",
                               "timestamp":1563969900,
                               "offset":10800
                            },
                            "2019-07-25":{
                               "aircraft":"738",
                               "time":"12:05",
                               "timestamp":1564056300,
                               "offset":10800
                            },
                            "2019-07-26":{
                               "aircraft":"320",
                               "time":"17:25",
                               "timestamp":1564161900,
                               "offset":10800
                            },
                            "2019-07-27":{
                               "aircraft":"738",
                               "time":"12:05",
                               "timestamp":1564229100,
                               "offset":10800
                            },
                            "2019-07-28":{
                               "aircraft":"320",
                               "time":"17:25",
                               "timestamp":1564334700,
                               "offset":10800
                            },
                            "2019-07-29":{
                               "aircraft":"738",
                               "time":"12:05",
                               "timestamp":1564401900,
                               "offset":10800
                            }
                         }
                      },
                      "PC1904":{
                         "utc":{
                            "2019-07-22":{
                               "aircraft":"320",
                               "time":"07:05",
                               "timestamp":1563779100,
                               "offset":10800
                            },
                            "2019-07-25":{
                               "aircraft":"320",
                               "time":"06:30",
                               "timestamp":1564036200,
                               "offset":10800
                            },
                            "2019-07-29":{
                               "aircraft":"320",
                               "time":"07:05",
                               "timestamp":1564383900,
                               "offset":10800
                            }
                         }
                      },
                      "PC1905":{
                         "utc":{
                            "2019-07-27":{
                               "aircraft":"738",
                               "time":"08:05",
                               "timestamp":1564214700,
                               "offset":10800
                            }
                         }
                      }
                   },
                   "position":{
                      "lat":"36.362778",
                      "lon":"36.282223"
                   }
                },
                "AYT":{
                   "name":"Antalya Airport",
                   "city":"Antalya",
                   "icao":"LTAI",
                   "distance":310398,
                   "flights":{
                      "PC1872":{
                         "utc":{
                            "2019-07-22":{
                               "aircraft":"320",
                               "time":"13:55",
                               "timestamp":1563803700,
                               "offset":10800
                            },
                            "2019-07-23":{
                               "aircraft":"320",
                               "time":"12:40",
                               "timestamp":1563885600,
                               "offset":10800
                            },
                            "2019-07-24":{
                               "aircraft":"320",
                               "time":"13:55",
                               "timestamp":1563976500,
                               "offset":10800
                            },
                            "2019-07-25":{
                               "aircraft":"320",
                               "time":"12:40",
                               "timestamp":1564058400,
                               "offset":10800
                            },
                            "2019-07-26":{
                               "aircraft":"320",
                               "time":"13:55",
                               "timestamp":1564149300,
                               "offset":10800
                            },
                            "2019-07-27":{
                               "aircraft":"320",
                               "time":"13:55",
                               "timestamp":1564235700,
                               "offset":10800
                            },
                            "2019-07-28":{
                               "aircraft":"320",
                               "time":"13:30",
                               "timestamp":1564320600,
                               "offset":10800
                            },
                            "2019-07-29":{
                               "aircraft":"320",
                               "time":"13:55",
                               "timestamp":1564408500,
                               "offset":10800
                            }
                         }
                      },
                      "PC1874":{
                         "utc":{
                            "2019-07-22":{
                               "aircraft":"738",
                               "time":"20:20",
                               "timestamp":1563826800,
                               "offset":10800
                            },
                            "2019-07-23":{
                               "aircraft":"738",
                               "time":"20:20",
                               "timestamp":1563913200,
                               "offset":10800
                            },
                            "2019-07-24":{
                               "aircraft":"738",
                               "time":"20:20",
                               "timestamp":1563999600,
                               "offset":10800
                            },
                            "2019-07-25":{
                               "aircraft":"738",
                               "time":"20:20",
                               "timestamp":1564086000,
                               "offset":10800
                            },
                            "2019-07-26":{
                               "aircraft":"738",
                               "time":"20:20",
                               "timestamp":1564172400,
                               "offset":10800
                            },
                            "2019-07-27":{
                               "aircraft":"738",
                               "time":"20:20",
                               "timestamp":1564258800,
                               "offset":10800
                            },
                            "2019-07-28":{
                               "aircraft":"738",
                               "time":"20:20",
                               "timestamp":1564345200,
                               "offset":10800
                            },
                            "2019-07-29":{
                               "aircraft":"738",
                               "time":"20:20",
                               "timestamp":1564431600,
                               "offset":10800
                            }
                         }
                      }
                   },
                   "position":{
                      "lat":"36.898731",
                      "lon":"30.800461"
                   }
                },
                "GZT":{
                   "name":"Gaziantep Oguzeli Airport",
                   "city":"Gaziantep",
                   "icao":"LTAJ",
                   "distance":409699,
                   "flights":{
                      "PC1890":{
                         "utc":{
                            "2019-07-22":{
                               "aircraft":"738",
                               "time":"12:00",
                               "timestamp":1563796800,
                               "offset":10800
                            },
                            "2019-07-23":{
                               "aircraft":"738",
                               "time":"12:00",
                               "timestamp":1563883200,
                               "offset":10800
                            },
                            "2019-07-24":{
                               "aircraft":"738",
                               "time":"12:00",
                               "timestamp":1563969600,
                               "offset":10800
                            },
                            "2019-07-25":{
                               "aircraft":"738",
                               "time":"12:00",
                               "timestamp":1564056000,
                               "offset":10800
                            },
                            "2019-07-26":{
                               "aircraft":"738",
                               "time":"12:00",
                               "timestamp":1564142400,
                               "offset":10800
                            },
                            "2019-07-27":{
                               "aircraft":"738",
                               "time":"12:00",
                               "timestamp":1564228800,
                               "offset":10800
                            },
                            "2019-07-28":{
                               "aircraft":"738",
                               "time":"12:00",
                               "timestamp":1564315200,
                               "offset":10800
                            },
                            "2019-07-29":{
                               "aircraft":"738",
                               "time":"12:00",
                               "timestamp":1564401600,
                               "offset":10800
                            }
                         }
                      },
                      "PC1892":{
                         "utc":{
                            "2019-07-24":{
                               "aircraft":"320",
                               "time":"06:30",
                               "timestamp":1563949800,
                               "offset":10800
                            },
                            "2019-07-27":{
                               "aircraft":"738",
                               "time":"07:25",
                               "timestamp":1564212300,
                               "offset":10800
                            }
                         }
                      }
                   },
                   "position":{
                      "lat":"36.947182",
                      "lon":"37.478680"
                   }
                },
                "SAW":{
                   "name":"Istanbul Sabiha Gokcen International Airport",
                   "city":"Istanbul",
                   "icao":"LTFJ",
                   "distance":736218,
                   "flights":{
                      "PC1897":{
                         "utc":{
                            "2019-07-22":{
                               "aircraft":"738",
                               "time":"18:20",
                               "timestamp":1563819600,
                               "offset":10800
                            },
                            "2019-07-23":{
                               "aircraft":"738",
                               "time":"18:20",
                               "timestamp":1563906000,
                               "offset":10800
                            },
                            "2019-07-24":{
                               "aircraft":"738",
                               "time":"18:20",
                               "timestamp":1563992400,
                               "offset":10800
                            },
                            "2019-07-25":{
                               "aircraft":"738",
                               "time":"18:20",
                               "timestamp":1564078800,
                               "offset":10800
                            },
                            "2019-07-26":{
                               "aircraft":"738",
                               "time":"18:20",
                               "timestamp":1564165200,
                               "offset":10800
                            },
                            "2019-07-27":{
                               "aircraft":"738",
                               "time":"18:20",
                               "timestamp":1564251600,
                               "offset":10800
                            },
                            "2019-07-28":{
                               "aircraft":"738",
                               "time":"18:20",
                               "timestamp":1564338000,
                               "offset":10800
                            },
                            "2019-07-29":{
                               "aircraft":"738",
                               "time":"18:20",
                               "timestamp":1564424400,
                               "offset":10800
                            }
                         }
                      },
                      "PC1911":{
                         "utc":{
                            "2019-07-22":{
                               "aircraft":"738",
                               "time":"02:40",
                               "timestamp":1563763200,
                               "offset":10800
                            },
                            "2019-07-23":{
                               "aircraft":"738",
                               "time":"02:40",
                               "timestamp":1563849600,
                               "offset":10800
                            },
                            "2019-07-24":{
                               "aircraft":"738",
                               "time":"02:40",
                               "timestamp":1563936000,
                               "offset":10800
                            },
                            "2019-07-25":{
                               "aircraft":"738",
                               "time":"02:40",
                               "timestamp":1564022400,
                               "offset":10800
                            },
                            "2019-07-26":{
                               "aircraft":"738",
                               "time":"02:40",
                               "timestamp":1564108800,
                               "offset":10800
                            },
                            "2019-07-27":{
                               "aircraft":"738",
                               "time":"02:40",
                               "timestamp":1564195200,
                               "offset":10800
                            },
                            "2019-07-28":{
                               "aircraft":"738",
                               "time":"02:40",
                               "timestamp":1564281600,
                               "offset":10800
                            },
                            "2019-07-29":{
                               "aircraft":"738",
                               "time":"02:40",
                               "timestamp":1564368000,
                               "offset":10800
                            }
                         }
                      },
                      "PC1915":{
                         "utc":{
                            "2019-07-26":{
                               "aircraft":"320",
                               "time":"19:20",
                               "timestamp":1564168800,
                               "offset":10800
                            },
                            "2019-07-28":{
                               "aircraft":"320",
                               "time":"19:20",
                               "timestamp":1564341600,
                               "offset":10800
                            }
                         }
                      },
                      "PC1917":{
                         "utc":{
                            "2019-07-22":{
                               "aircraft":"738",
                               "time":"07:20",
                               "timestamp":1563780000,
                               "offset":10800
                            },
                            "2019-07-23":{
                               "aircraft":"738",
                               "time":"07:20",
                               "timestamp":1563866400,
                               "offset":10800
                            },
                            "2019-07-24":{
                               "aircraft":"738",
                               "time":"07:20",
                               "timestamp":1563952800,
                               "offset":10800
                            },
                            "2019-07-25":{
                               "aircraft":"738",
                               "time":"07:20",
                               "timestamp":1564039200,
                               "offset":10800
                            },
                            "2019-07-26":{
                               "aircraft":"738",
                               "time":"07:20",
                               "timestamp":1564125600,
                               "offset":10800
                            },
                            "2019-07-27":{
                               "aircraft":"738",
                               "time":"07:20",
                               "timestamp":1564212000,
                               "offset":10800
                            },
                            "2019-07-28":{
                               "aircraft":"738",
                               "time":"07:20",
                               "timestamp":1564298400,
                               "offset":10800
                            },
                            "2019-07-29":{
                               "aircraft":"738",
                               "time":"07:20",
                               "timestamp":1564384800,
                               "offset":10800
                            }
                         }
                      },
                      "PC1919":{
                         "utc":{
                            "2019-07-26":{
                               "aircraft":"738",
                               "time":"11:35",
                               "timestamp":1564140900,
                               "offset":10800
                            },
                            "2019-07-28":{
                               "aircraft":"738",
                               "time":"11:35",
                               "timestamp":1564313700,
                               "offset":10800
                            }
                         }
                      },
                      "PC1921":{
                         "utc":{
                            "2019-07-22":{
                               "aircraft":"320",
                               "time":"16:45",
                               "timestamp":1563813900,
                               "offset":10800
                            },
                            "2019-07-24":{
                               "aircraft":"738",
                               "time":"17:00",
                               "timestamp":1563987600,
                               "offset":10800
                            },
                            "2019-07-25":{
                               "aircraft":"320",
                               "time":"16:45",
                               "timestamp":1564073100,
                               "offset":10800
                            },
                            "2019-07-27":{
                               "aircraft":"738",
                               "time":"16:55",
                               "timestamp":1564246500,
                               "offset":10800
                            },
                            "2019-07-29":{
                               "aircraft":"320",
                               "time":"16:45",
                               "timestamp":1564418700,
                               "offset":10800
                            }
                         }
                      },
                      "PC1923":{
                         "utc":{
                            "2019-07-26":{
                               "aircraft":"738",
                               "time":"20:00",
                               "timestamp":1564171200,
                               "offset":10800
                            },
                            "2019-07-28":{
                               "aircraft":"738",
                               "time":"20:00",
                               "timestamp":1564344000,
                               "offset":10800
                            }
                         }
                      },
                      "PC1931":{
                         "utc":{
                            "2019-07-22":{
                               "aircraft":"738",
                               "time":"15:10",
                               "timestamp":1563808200,
                               "offset":10800
                            },
                            "2019-07-23":{
                               "aircraft":"738",
                               "time":"15:10",
                               "timestamp":1563894600,
                               "offset":10800
                            },
                            "2019-07-24":{
                               "aircraft":"738",
                               "time":"15:10",
                               "timestamp":1563981000,
                               "offset":10800
                            },
                            "2019-07-25":{
                               "aircraft":"738",
                               "time":"15:10",
                               "timestamp":1564067400,
                               "offset":10800
                            },
                            "2019-07-26":{
                               "aircraft":"738",
                               "time":"15:10",
                               "timestamp":1564153800,
                               "offset":10800
                            },
                            "2019-07-27":{
                               "aircraft":"738",
                               "time":"15:30",
                               "timestamp":1564241400,
                               "offset":10800
                            },
                            "2019-07-28":{
                               "aircraft":"738",
                               "time":"15:10",
                               "timestamp":1564326600,
                               "offset":10800
                            },
                            "2019-07-29":{
                               "aircraft":"738",
                               "time":"15:10",
                               "timestamp":1564413000,
                               "offset":10800
                            }
                         }
                      },
                      "PC1933":{
                         "utc":{
                            "2019-07-22":{
                               "aircraft":"320",
                               "time":"05:25",
                               "timestamp":1563773100,
                               "offset":10800
                            },
                            "2019-07-23":{
                               "aircraft":"320",
                               "time":"05:25",
                               "timestamp":1563859500,
                               "offset":10800
                            },
                            "2019-07-24":{
                               "aircraft":"320",
                               "time":"05:20",
                               "timestamp":1563945600,
                               "offset":10800
                            },
                            "2019-07-25":{
                               "aircraft":"320",
                               "time":"05:25",
                               "timestamp":1564032300,
                               "offset":10800
                            },
                            "2019-07-26":{
                               "aircraft":"320",
                               "time":"05:30",
                               "timestamp":1564119000,
                               "offset":10800
                            },
                            "2019-07-27":{
                               "aircraft":"320",
                               "time":"05:25",
                               "timestamp":1564205100,
                               "offset":10800
                            },
                            "2019-07-28":{
                               "aircraft":"320",
                               "time":"05:25",
                               "timestamp":1564291500,
                               "offset":10800
                            },
                            "2019-07-29":{
                               "aircraft":"320",
                               "time":"05:25",
                               "timestamp":1564377900,
                               "offset":10800
                            }
                         }
                      },
                      "PC7281":{
                         "utc":{
                            "2019-07-23":{
                               "aircraft":"738",
                               "time":"19:30",
                               "timestamp":1563910200,
                               "offset":10800
                            }
                         }
                      }
                   },
                   "position":{
                      "lat":"40.898548",
                      "lon":"29.309210"
                   }
                },
                "ADB":{
                   "name":"Izmir Adnan Menderes International Airport",
                   "city":"Izmir",
                   "icao":"LTBJ",
                   "distance":663748,
                   "flights":{
                      "PC1861":{
                         "utc":{
                            "2019-07-22":{
                               "aircraft":"738",
                               "time":"04:45",
                               "timestamp":1563770700,
                               "offset":10800
                            },
                            "2019-07-23":{
                               "aircraft":"738",
                               "time":"04:45",
                               "timestamp":1563857100,
                               "offset":10800
                            },
                            "2019-07-24":{
                               "aircraft":"738",
                               "time":"04:45",
                               "timestamp":1563943500,
                               "offset":10800
                            },
                            "2019-07-25":{
                               "aircraft":"738",
                               "time":"04:45",
                               "timestamp":1564029900,
                               "offset":10800
                            },
                            "2019-07-26":{
                               "aircraft":"738",
                               "time":"04:45",
                               "timestamp":1564116300,
                               "offset":10800
                            },
                            "2019-07-27":{
                               "aircraft":"738",
                               "time":"04:45",
                               "timestamp":1564202700,
                               "offset":10800
                            },
                            "2019-07-28":{
                               "aircraft":"738",
                               "time":"04:20",
                               "timestamp":1564287600,
                               "offset":10800
                            },
                            "2019-07-29":{
                               "aircraft":"738",
                               "time":"04:45",
                               "timestamp":1564375500,
                               "offset":10800
                            }
                         }
                      },
                      "PC1863":{
                         "utc":{
                            "2019-07-24":{
                               "aircraft":"738",
                               "time":"18:40",
                               "timestamp":1563993600,
                               "offset":10800
                            },
                            "2019-07-25":{
                               "aircraft":"738",
                               "time":"18:40",
                               "timestamp":1564080000,
                               "offset":10800
                            },
                            "2019-07-26":{
                               "aircraft":"738",
                               "time":"18:40",
                               "timestamp":1564166400,
                               "offset":10800
                            },
                            "2019-07-27":{
                               "aircraft":"738",
                               "time":"18:40",
                               "timestamp":1564252800,
                               "offset":10800
                            },
                            "2019-07-28":{
                               "aircraft":"738",
                               "time":"18:50",
                               "timestamp":1564339800,
                               "offset":10800
                            }
                         }
                      },
                      "PC1865":{
                         "utc":{
                            "2019-07-23":{
                               "aircraft":"738",
                               "time":"09:40",
                               "timestamp":1563874800,
                               "offset":10800
                            },
                            "2019-07-26":{
                               "aircraft":"738",
                               "time":"13:00",
                               "timestamp":1564146000,
                               "offset":10800
                            },
                            "2019-07-28":{
                               "aircraft":"738",
                               "time":"14:40",
                               "timestamp":1564324800,
                               "offset":10800
                            }
                         }
                      },
                      "PC1867":{
                         "utc":{
                            "2019-07-22":{
                               "aircraft":"738",
                               "time":"18:40",
                               "timestamp":1563820800,
                               "offset":10800
                            },
                            "2019-07-23":{
                               "aircraft":"738",
                               "time":"18:50",
                               "timestamp":1563907800,
                               "offset":10800
                            },
                            "2019-07-29":{
                               "aircraft":"738",
                               "time":"18:40",
                               "timestamp":1564425600,
                               "offset":10800
                            }
                         }
                      }
                   },
                   "position":{
                      "lat":"38.292389",
                      "lon":"27.156950"
                   }
                }
             }
          }
       }
    }
    

    0x0480 takilin madem
  5. KısayolKısayol reportŞikayet pmÖzel Mesaj
    end
    end's avatar
    Kayıt Tarihi: 16/Ekim/2016
    let data = {}
    data = Object.keys(data.arrivals.Turkey.airports).map(cities => data.arrivals.Turkey.airports[cities])

    istediğine yakın bir sonuç verecektir, kesmezse eve döndüğümde bakayım dediğim üzere.

    Düzenleme: 

    data = Object.keys(data.arrivals.Turkey.airports).map(x => data.arrivals.Turkey.airports[x]).map(x => ({'icao': x.icao, 'distance': x.distance, 'flightNumber': Object.keys(x.flights)[0]}))

    Şeklinde düzenledim kabaca, ama mantık hatası var. Javascriptte high order'a hakim değilim ne yazık ki...

     

    end tarafından 22/Tem/19 13:49 tarihinde düzenlenmiştir

    0x0480 takilin madem
  6. KısayolKısayol reportŞikayet pmÖzel Mesaj
    YekteranBaymedir
    YekteranBaymedir's avatar
    Kayıt Tarihi: 10/Temmuz/2009
    Homo

    içeriğinin ve şemasının zamanla değişebileceğini düşündüğün json verilerini

    recursive fonksiyon ile belirli nesneleri arayacak ve istediğin kısımları çıkartacak şekilde de çözebilirsin

     

    örneğine tam uymuyor ama instagram'ın verdiği fotoğraf listesinde daha güzel iş görür

  7. KısayolKısayol reportŞikayet pmÖzel Mesaj
    saybirs
    saybirs's avatar
    Kayıt Tarihi: 24/Temmuz/2009
    Erkek

    https://app.quicktype.io 

    sitesine json'ı yapıştır, ve dilini seç sana class yapısını hazırlasın. Dönen datayı bu class tipine cast et tamamdır oldu bitti :)

    İstediğin property'e class mantığında ulaşırsın. 

    var getDistance =arrivals.airports.ADA.distance etc.

     

  8. KısayolKısayol reportŞikayet pmÖzel Mesaj
    yabadabadoo
    yabadabadoo's avatar
    Kayıt Tarihi: 15/Temmuz/2019
    Erkek

    Buyurun hocam, hallettim. Kullanimi su sekilde, fonksiyonun icine json veriyi atiyoruz. Gelen obje gelenler ve gidenler diye ikiye ayriliyor. Iclerinde de istediginiz formatta veri var. Bir de, ucuslarin hangi ulkeden geldigini de ekledim. Yani verinin formati su: { country, icao, distance, flightNumber, timestamp }

    function yabadabadoo (data) {
        let sonuc = {
            gelenler: [],
            gidenler: []
        }

        Object.entries(data.arrivals).forEach( val => {
            let ulkeAdi = val[0]
            
            Object.values(val[1].airports).forEach( airp => {
                let icao = airp.icao
                let distance = airp.distance

                Object.entries( airp.flights).forEach( fl => {
                    let flight = fl[0]

                    Object.values( fl[1].utc ).forEach( entr => {
                        let timestamp = entr.timestamp

                        sonuc.gelenler.push( {
                            country: ulkeAdi,
                            icao: icao,
                            distance: distance,
                            flightNumber: flight,
                            timestamp: timestamp
                        })
                    })
                })
            })
        })

        Object.entries(data.departures).forEach( val => {
            let ulkeAdi = val[0]
            
            Object.values(val[1].airports).forEach( airp => {
                let icao = airp.icao
                let distance = airp.distance

                Object.entries( airp.flights).forEach( fl => {
                    let flight = fl[0]

                    Object.values( fl[1].utc ).forEach( entr => {
                        let timestamp = entr.timestamp

                        sonuc.gidenler.push( {
                            country: ulkeAdi,
                            icao: icao,
                            distance: distance,
                            flightNumber: flight,
                            timestamp: timestamp
                        })
                    })
                })
            })
        })

        return sonuc
    }

     

     


    Buraya daha sonra ozlu bir soz girilecek
  9. KısayolKısayol reportŞikayet pmÖzel Mesaj
    end
    end's avatar
    Kayıt Tarihi: 16/Ekim/2016

    Canım sıkılınca internet cafe'ye gelip 1 saat açtırdım.

    function reDesign(data) {
        data = Object.keys(data.arrivals.Turkey.airports).map(cities => data.arrivals.Turkey.airports[cities])
    
        var formatted = []
        data.forEach(
            (v) => {
                let temp = {}
                temp.icao = v.icao
                temp.distance = v.distance
                Object.entries(v.flights).forEach((k) => {
                    temp.flightNumber = k[0]
                    Object.entries(k[1].utc).forEach(d => {
                        temp.date = d[0]
           		    temp.timestamp = d[1].timestamp 
            
                        formatted.push({
                            ...temp
                        })
                    })
                })
            }
        )
        return formatted
    }

    reDesign(data)

    yaparsan sana istediğin formatta output verecektir hocam.

     

    end tarafından 22/Tem/19 19:42 tarihinde düzenlenmiştir

    0x0480 takilin madem
  10. KısayolKısayol reportŞikayet pmÖzel Mesaj
    RockZs
    RockZs's avatar
    Kayıt Tarihi: 30/Haziran/2002
    Erkek

    Önerileriniz için çok teşekkür ederim @end ,@YekteranBaymedir ,@saybirs ve @yabadabadoo .

    Verdiğiniz örnekler "iterasyonu" daha iyi öğrenmem için faydalı olacaklar. Şu anda inceliyorum, anlamaya çalışıyorum. 

    Object.entries(), Object.values() ve forEach() metodlarını çalışmam gerek.

    Sevgiler.

Toplam Hit: 459 Toplam Mesaj: 10
veri işleme