Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8589395
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T23:02:52+00:00 2026-06-11T23:02:52+00:00

i have a short code of getting json data from another domain, im a

  • 0

i have a short code of getting json data from another domain, im a newbie in json codes thus i cant understand how do i get the under category data only, for example in this code:

$.getJSON("http://api.anywayanyday.com/api/NewRequest/?Route=2406MOWLON&AD=1&CN=0&CS=E&Partner=testapic&_Serialize=JSON&callback=?", function(data) {
    var code=data.Id;
    $.getJSON("http://api.anywayanyday.com/api/Fares/?R="+code+"&V=Matrix&VB=true&L=ru&_Serialize=JSON&callback=?", function(data) {
        var items = [];
        $.each(data, function(key, val) {
            items.push('<li>'+key+': '+val+'</li>');
        });
        $('<ul/>', {
            'class': 'my-new-list',
            html: items.join('')
        }).appendTo('#data2');
    });
});

im getting the list of currency, lang, sortby and etc, and there is an Airlines category and a lot of objects inside, all i want is to get just these airlines objects and their names(at least they are must be in json data list), how do i do it?!

thank you all for the help, i really appreciate it!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T23:02:53+00:00Added an answer on June 11, 2026 at 11:02 pm

    You can try this to get Airlines name in an unorder list

    $.getJSON("http://api.anywayanyday.com/api/NewRequest/?Route=2406MOWLON&AD=1&CN=0&CS=E&Partner=testapic&_Serialize=JSON&callback=?", function(data) {
        var code=data.Id;
        $.getJSON("http://api.anywayanyday.com/api/Fares/?R="+code+"&V=Matrix&VB=true&L=ru&_Serialize=JSON&callback=?", function(data) {
            var items = [];
            $.each(data, function(key, val) {
                if(val && (typeof val == 'object' || typeof val == 'array')){
                    if(key == "Airlines"){
                        var airlineNames = [];
    
                        for(var x in val)
                            airlineNames.push(val[x].Name);
    
                        items.push('<li>'+key+': <ul><li>'+airlineNames.join('</li><li>')+'</li></ul></li>');
                    }
                }else{
                    items.push('<li>'+key+': '+val+'</li>');
                }
            });
            $('<ul/>', {
                'class': 'my-new-list',
                html: items.join('')
            }).appendTo('#data2');
        });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have problems getting data from grails using extjs. My Grails controller code is:
I'm currently playing with reflection and I have problem with my short code: public
I have a short question i have wrote this in java. Old code: class
I have some basic PHP code: $raceramps56[short] = My Test Product; $leftMenu = '<div
I have this code to sort an array of objects. The data in the
I'm storing JSON data in a MySQL table using the code below. It works
I have written following code for getting location name : UseGpsActivity.java public class UseGpsActivity
First a short overview of my code, i hope its understandable: I have a
Long story short, VSS decided I wasn't allowed to have some code changes. I
I'm getting a json exception when I try to run my code. The problem

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.