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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T13:30:56+00:00 2026-06-15T13:30:56+00:00

This is my JSON string generated by C# JSON parser: { NewDataSet: { Table:

  • 0

This is my JSON string generated by C# JSON parser:

{
    "NewDataSet": {
        "Table": [
            {
                "ResultId": "1",
                "AttachmentId": "1",
                "AttachmentName": "Report1",
                "RowsCount": "34",
                "NotifyUserName": "william",
                "InsBy": "developer",
                "InsAt": "2012-12-07T17:28:01.46+08:00",
                "IsNotify": "false"
            },
            {
                "ResultId": "2",
                "AttachmentId": "2",
                "AttachmentName": "Report2",
                "RowsCount": "37",
                "NotifyUserName": "william",
                "InsBy": "developer",
                "InsAt": "2012-12-07T17:28:15.57+08:00",
                "IsNotify": "false"
            },
            {
                "ResultId": "3",
                "AttachmentId": "3",
                "AttachmentName": "Report3",
                "RowsCount": "69",
                "NotifyUserName": "william",
                "InsBy": "developer",
                "InsAt": "2012-12-07T17:28:25.58+08:00",
                "IsNotify": "false"
            }
        ]
    }
}

Then I would like to parse the string to front end JavaScript to iterate the value.
I did this way.

  var jsonText;
        $.ajax({
            type: "POST",
            url: "Default.aspx/MethodWithNoParameterJSON",
            data: {},
            contentType: "application/json;charset=utf-8",
            dataType: "json",
            async: true,
            cache: false,
            success: function (msg) {
                //rulesName = dbtitle+msg.d;
                //rulesCount = +msg.d;
                jsonText = msg.d;
               alert(jsonText.NewDataSet.Table[0].ResultId), 
            },
            error: function (x, e) {
                alert("The call to the server side failed. " + x.responseText);
            }
        });

How can I get the child element data like jsonText.NewDataSet.Table[0].ResultId? Whenever I call alert(jsonText.NewDataSet.Table[0].ResultId), it will always prompt null or undefined object.

  • 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-15T13:30:57+00:00Added an answer on June 15, 2026 at 1:30 pm

    Why are you using msg.d to set your jsonText variable? Where does the .d property come from? The msg parameter should already be the object created from your JSON response. Try this instead:

    msg.NewDataSet.Table[0].ResultId
    

    (And note that your jsonText variable is badly named: what you have at that point is not JSON or “text”, it is an object – or, in your case, undefined because msg.d is undefined. But you are trying to use it as an object, not as JSON.)

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

Sidebar

Related Questions

I'm getting this json string info from the server : {members:[[sd2840d,Johny],[jkld341,Marry]]} So I store
I have this json string: $row['medium'] = {\medium\:13|17|1|14, \medium_sub\:21}; now I want to make
Possible Duplicate: How to parse JSON in JavaScript I have this JSON string: [{title:
I have this JSON response string: {d:{\ID_usuario\:\000130\,\Nombre\:null,\Vipxlo\:0,\Provmun\:null,\Descuentos\:null,\Listaviplocal\:null}}` With this code: - (void)connectionDidFinishLoading:(NSURLConnection *)connection {
I'm checking if an object in a JSON string exists using this: JSONObject json
I have a YQL output JSON string at this URL: YQL JSON I found
I would like to serialize this object to JSON String public class Person {
This is the structure of my JSON: string sample = [{'Disp_Name':'avi garg', 'emailId':'avi@india.com', 'fName':'avi',
I have a json string like this: { d: { results: [ { __metadata:
I have a JSON string that looks like this: { package1: { type: envelope,

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.