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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T16:55:30+00:00 2026-06-12T16:55:30+00:00

my data.json looks like this: { selection_form : { entities : { name:0002 ,

  • 0

my data.json looks like this:

{
    "selection_form" : {
        "entities" : { 
            "name":"0002" ,
            "name":"0103" ,
            "name":"0104" ,
            "name":"0122" ,
....

this script looks loke this

  <script>     
            $.getJSON('data.json', function(data) {   
                $.each(data.selection_form.entities, function(i,item){
                    $("#enity").append('<p>'+data.selection_form.entities.name+'</p>');
                });
            });
        </script>

i want to get all names wraped in a p tag like

<p>0002</p><p>0103</p>....

but the result is ony the last name item. I can’t find a soloution for that. Need help!

  • 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-12T16:55:32+00:00Added an answer on June 12, 2026 at 4:55 pm

    An object can’t have properties with same names. entities object has one name property with value of 0122. You should change the property names.

    {
        "selection_form": {
            "entities": {
                "name1": "0002",
                "name2": "0103",
                "name3": "0104",
                "name4": "0122",
            }
        }
    }
    
    $.getJSON('data.json', function(data) {   
          $.each(data.selection_form.entities, function(i,item){
               $("#enity").append('<p>'+item+'</p>');
          });
     });
    

    http://jsfiddle.net/vB6qe/

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

Sidebar

Related Questions

I am getting JSON string from website. I have data which looks like this
my return json file looks like this: var data = [{col1:value1,col2:value1,col3:value1},{col1:value2,col2:value2,col3:value2},{col1:value3,col2:value3,col3:value3}]; without JSON.stringify data
My json data looks like this, {Table : [{accid : 13,accname : Default,accountType :
I'm using JSON.Net for serializeation. I need my data to look like this json
How do I save JSON data in a cookie? My JSON data looks like
I have a json document (as_stats.json) that looks something like this: {failed:5, received: {192.168.5.2:
I'm stuck with parsing JSON in Java using org.json. My JSON looks like this
I currently have this: $.getJSON('test.json', function(data) { var items = []; $.each(data, function(key, val)
My JSON object that is returned from the server looks like this: [ {
I am including a custom method for formatting my json data. My controller looks

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.