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

  • Home
  • SEARCH
  • 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 7750805
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T11:23:09+00:00 2026-06-01T11:23:09+00:00

I used console.log(response); and got the following in console (in Firebug). How do I

  • 0

I used

console.log(response);

and got the following in console (in Firebug). How do I loop through to check if “LMNOPQ” exists?

data        [Object { name="Excel in ABCD", category="Book", id="327361517327399", more...}, Object { name="LMNOPQ", category="Product/service", id="175625882542984", more...}, Object { name="UVWXYZ", category="Book", id="260641707360118", more...}, 7 more...]
            0       Object { name="Excel in ABCD", category="Book", id="327361517327399", more...}
            category        "Book"
            created_time        "2012-04-04T05:31:04+0000"
            id      "327361517327399"
            name        "Excel in ABCD"
            1       Object { name="LMNOPQ", category="Product/service", id="175625882542984", more...}
            2       
Object { name="UVWXYZ", category="Book", id="260641707360118", more...}

Then as suggested by Baptiste Pernet, I tried the following:

for(var i in response) {
    console.log(response[i].name);//gives me undefined
    console.log(response[i]);//gives me another object (it is nested, check below)
}

[Object { name=”Excel in ABCD”, category=”Book”, id=”327361517327399″,
more…}, Object { name=”LMNOPQ”, category=”Product/service”,
id=”175625882542984″, more…}, Object { name=”UVWXYZ”,
category=”Book”, id=”260641707360118″, more…},

How do I get this name now? I’m stuck at:

console.log(response[i]);

What should I write in order to get the properties of nested objects? Another loop?

  • 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-01T11:23:10+00:00Added an answer on June 1, 2026 at 11:23 am

    You should try to use JSON.stringify(response) and then this site to visualize the result. It is far more standard than the format you provide.

    From what you gave, it seems that you have a member called data that contains an array (again, I am not sure because you didn’t provide a good format to describe you javascript object).

    So let’s try

    for(var i in response.data) {
      if (response.data[i].name == 'LMOPQ') {
        return true
      }
    }
    
    return false;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What's the difference between console.log(process.cwd()) and console.log(__dirname); I've seen both used in similar contexts.
I have the following script: if (window.location.href.indexOf('env=P')) { env = 'P'; console.log(P); } else
$(document).ready(function() { $(#register button[name=btnPosta]).click(function() { console.log('clicked'); thisBtn = $(this); parent = $(this).parent(); name =
I just discovered that the following code executes without error (Chrome): console.log(fa); function fa(){}
It used to be that stdout went to the console log, displayed by Console.app.
I am using the console application i used multi threading in the same. I
In a console app, an ascii spinner can be used, like the GUI wait
I have used log4net in winforms before. First time using with a wpf console
I used the LINQ to SQL designer in Visual Studio to create an object
I have the following code which is used to slidein/out a div (shopping basket)

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.