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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T12:15:22+00:00 2026-05-22T12:15:22+00:00

I have the JSON: { GetCommentsByPostResult: [ { CommentCreated: \\/Date(1305736030505+0100)\\/, CommentText: Comment 1 },

  • 0

I have the JSON:

{
    "GetCommentsByPostResult": [
        {
            "CommentCreated": "\\/Date(1305736030505+0100)\\/",
            "CommentText": "Comment 1"
        },
        {
            "CommentCreated": "\\/Date(1305736030505+0100)\\/",
            "CommentText": "Comment 2"
        },
        {
            "CommentCreated": "\\/Date(1305736030505+0100)\\/",
            "CommentText": "Comment 2"
        }
    ]
}

And Im trying to iterate over it using this:

$.each(data.GetCommentsByPostResult, function (e) {
                        alert(e.CommentText);
                    });

But all im getting is 3 alert screens with ‘undefined’ in it….no idea why anyone know?

  • 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-22T12:15:22+00:00Added an answer on May 22, 2026 at 12:15 pm

    Because the first parameter in $.each‘s callback (when called on an array) is the index in to the array.

    This should work:

    $.each(data.GetCommentsByPostResult, function(index, element) {
        alert(element.CommentText);
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have JSON Data in this format : var jsonData = [{date:'August 19, 2004',open:100.01,high:104.06},{date:'August
I have Json response from my database . I am using Php for this
I have json file that I have exported using TexturePacker, and it produces this
I have a JSON array with ActiveRecord objects. These objects can be reconstructed using
I have some JSON returned to the browser like this product: { Title: School
I have json data like this: { Adobe Photoshop: 70, Adobe Premier: 71, Animasyon:
I am new to json. I have json output that looks like this [
I have a JSON object that looks like this. [ { id : 23,
I have JSON Object that looks something like the below object, this object can
I have Json object like this { resultArr: [ { ID:1, 0:1, APPROVAL LEVEL:1,

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.