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 7060337
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T04:20:27+00:00 2026-05-28T04:20:27+00:00

could you please help me figure out why I’m getting undefined instead of the

  • 0

could you please help me figure out why I’m getting “undefined” instead of the value.

As it is plain to see I’m having trouble getting the data from the array, in firebug I get this as a response….

{"status":"success",
 "response":[
    {"email":
        {"email":"xxxxx@iing.mxl.uabc.mx",
         "valid":"1",
         "reason":null,
         "confirmed_at":"0000-00-00 00:00:00",
         "contact_email":"1",
         "login_email":"1",
         "users_id":"6375"},
     "history":[
        {"contactRole":"Non Classified Lead with History",
         "contactProject":"2082",
         "contactBrand":"B"},
        {"contactRole":"co Author",
         "contactProject":"32",
         "contactBrand":"B"},
        {"contactRole":"co Author",
         "contactProject":"176",
         "contactBrand":"B"},
        {"contactRole":"co Author",
         "contactProject":"582",
         "contactBrand":"B"},
        {"contactRole":"co Author",
         "contactProject":"1858",
         "contactBrand":"B"},
        {"contactRole":"Author",
         "contactProject":"12",
         "contactBrand":"J"},
        {"contactRole":"Editor",
         "contactProject":"176",
         "contactBrand":"B"}]},
    {"email":
        {"email":"xxxxx@hotmail.com",
         "valid":"1",
         "reason":null,
         "confirmed_at":"0000-00-00 00:00:00",
         "contact_email":"0",
         "login_email":"0",
         "users_id":"6375"},
     "history":[]}]}

this is the code referring to my javascript file
http://pastebin.com/gPaEAKim

snapshot of the view that I’m getting.

enter image description here

Just to be on the safe side…this is the way the array looks like when I debug it from the controller

    Array
(
    [status] => success
    [response] => Array
        (
            [0] => Array
                (
                    [email] => Array
                        (
                            [email] => xxxxx@iing.mxl.uabc.mx
                            [valid] => 1
                            [reason] => 
                            [confirmed_at] => 0000-00-00 00:00:00
                            [contact_email] => 1
                            [login_email] => 1
                            [users_id] => 6375
                        )

                    [history] => Array
                        (
                            [0] => Array
                                (
                                    [contactRole] => Non Classified Lead with History
                                    [contactProject] => 2082
                                    [contactBrand] => B
                                )

                            [1] => Array
                                (
                                    [contactRole] => co Author
                                    [contactProject] => 32
                                    [contactBrand] => B
                                )

                            [2] => Array
                                (
                                    [contactRole] => co Author
                                    [contactProject] => 176
                                    [contactBrand] => B
                                )

                            [3] => Array
                                (
                                    [contactRole] => co Author
                                    [contactProject] => 582
                                    [contactBrand] => B
                                )

                            [4] => Array
                                (
                                    [contactRole] => co Author
                                    [contactProject] => 1858
                                    [contactBrand] => B
                                )

                            [5] => Array
                                (
                                    [contactRole] => Author
                                    [contactProject] => 12
                                    [contactBrand] => J
                                )

                            [6] => Array
                                (
                                    [contactRole] => Editor
                                    [contactProject] => 176
                                    [contactBrand] => B
                                )

                        )

                )

            [1] => Array
                (
                    [email] => Array
                        (
                            [email] => xxxxxxx@hotmail.com
                            [valid] => 1
                            [reason] => 
                            [confirmed_at] => 0000-00-00 00:00:00
                            [contact_email] => 0
                            [login_email] => 0
                            [users_id] => 6375
                        )

                    [history] => Array
                        (
                        )

                )

        )

)
  • 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-05-28T04:20:27+00:00Added an answer on May 28, 2026 at 4:20 am

    If your data var in your JS code is the entirety of the JSON response, then you’re working one level too high, and the inner loop is working 2 levels too high:

    $.each(data['response'], function(i, email) { 
               ^^^^^^^^^^^^--- missing this
    
          $.each(email, function(ii, ...)) {
    

    as your code stands now, the inner loop’s email is overwriten your outer loop’s as well.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Could someone please help me figure out what is wrong with the following code
Could someone please help me figure out what is wrong with my program, AND
Please help! I couldn't figure it out how to map the following situation: I
Could you please help me find out the time complexity of the Fleury' algorithm
Could you please help me to get image upload working on a view with
Could you please help me how to format a struct timeval instance to human
Could someone please help me in here, I'm just a beginner who want to
Could somebody please help me get Clang up and running? (I don't have 3.2)
Could someone please help explain why I can't get this to work? I properly
Could anyone please help me convert this code to vb.net, I have tried it

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.