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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T17:45:35+00:00 2026-06-12T17:45:35+00:00

i usally work with Json objects on my asp.net mvc by looping through the

  • 0

i usally work with Json objects on my asp.net mvc by looping through the object and display the result such as

$.each(data, function (key, val) { 

                        // Format the text to display. 
                        var str = val.id + ': $' + val.packageName; 

                        // Add a list item for the product. 
                        $('<li/>', { text: str }) 
                        .appendTo($('#products')); 

But i came across a web service that return Json object in the following format that contains some sort of hireachy:-

{
  "total":3,
  "desc":false,
  "sort":"name",
  "start":0,
  "data":
  [
    {"id":"hdc_v1001#1#hdc_certification_process",
      "packageName":"halal certification",
      "name":"HDC Certification Process",
      "packageId":"hdc_v1001",
      "label":"HDC Certification Process ver 1",
      "version":"1"},
    {"id":"mdec_v1002#12#mdec_wp1",
      "packageName":"Mdec Work Progress",
      "name":"mdec_wp1",
      "packageId":"mdec_v1002",
      "label":"mdec_wp1 ver 12",
      "version":"12"},
    {"id":"mora#5#mora_new_application",
      "packageName":"MORA Halal Certification",
      "name":"MORA New Application",
      "packageId":"mora",
      "label":"MORA New Application ver 5",
      "version":"5"}
  ]
}

So how i will be able to loop through the Json object in this case to displayed its values ?
Best Regards

  • 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-12T17:45:36+00:00Added an answer on June 12, 2026 at 5:45 pm
    myJsonObject = {
      "total":3,
      "desc":false,
      "sort":"name",
      "start":0,
      "data":
      [
        {"id":"hdc_v1001#1#hdc_certification_process",
          "packageName":"halal certification",
          "name":"HDC Certification Process",
          "packageId":"hdc_v1001",
          "label":"HDC Certification Process ver 1",
          "version":"1"},
        {"id":"mdec_v1002#12#mdec_wp1",
          "packageName":"Mdec Work Progress",
          "name":"mdec_wp1",
          "packageId":"mdec_v1002",
          "label":"mdec_wp1 ver 12",
          "version":"12"},
        {"id":"mora#5#mora_new_application",
          "packageName":"MORA Halal Certification",
          "name":"MORA New Application",
          "packageId":"mora",
          "label":"MORA New Application ver 5",
          "version":"5"}
      ]
    };
    $.each(myJsonObject.data, function (key, val) { 
    
                        // Format the text to display. 
                        var str = val.id + ': $' + val.packageName; 
    
                        // Add a list item for the product. 
                        $('<li/>', { text: str }) 
                        .appendTo($('#products')); 
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

ASP .NET 4.0 with MVC 3.0 So here's the situation: I am new to
Hi I have to send data to server via JSON and usually I do
I usually work with .NET but I have a php page that calls an
I don't usually work with this type of data layer so I'm not familiar
So, I've been playing with ASP.net MVC4 and the new WebAPI the past few
I usually work with .NET WinForms but now have to work on some Java
I'll preface this by saying that I usually work in C#/.Net. Normally, I use
I have a very simple ASP.NET web application created under Visual Studio 2008 (SP1),
I usually work with PHP so sadly don't have some basic JS principles down.
I usually test my code locally on my work machine and then move 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.