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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T08:01:56+00:00 2026-05-30T08:01:56+00:00

So I have a JSON file, which is basically an ATOM XML encoded into

  • 0

So I have a JSON file, which is basically an ATOM XML encoded into JSON with PHP, each entry looks like this:

{
    id: "info:fedora/demo:SmileyBucket/RELS-EXT/2008-07-02T05:09:42.937Z",
    title: "RELS-EXT.0",
    updated: "2008-07-02T05:09:42.937Z",
    category: [
        {
            @attributes: {
                term: "info:fedora/fedora-system:FedoraRELSExt-1.0",
                scheme: "info:fedora/fedora-system:def/model#formatURI"
            }
        },
        {
            @attributes: {
                term: "RDF Statements about this object",
                scheme: "info:fedora/fedora-system:def/model#label"
            }
        },
        {
            @attributes: {
                term: "500",
                scheme: "info:fedora/fedora-system:def/model#length"
            }
        }
    ],
    content: {
        @attributes: {
            type: "application/rdf+xml"
        }
    }
}, 

I can get all the data except the things that are in @attributes.
Here is a snippet of my jQuery:

$("#content-pane").text("ID: " +json.id);
$("#content-pane").append("<br/> Title: " +json.title);
$("#content-pane").append("<br/> Attributes: " +json.entry[5].content.toString());

Thanks

  • 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-30T08:01:58+00:00Added an answer on May 30, 2026 at 8:01 am

    You can access properties using a key:

    var attributes = json.category[0]["@attributes"];
    

    One other note: Proper JSON has to have the key names in double quotes (please note there’s a difference between a JSON as data interchange format, and defining an object in script). If you define an object in script using JSON syntax, you will need to quote key names that have illegal characters (such as @).

    Here’s a Fiddle showing a working sample. http://jsfiddle.net/4YhTk/3/

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

Sidebar

Related Questions

I have a json file which contains questions and answers like this. { Questions:
I have an XML file which I want to convert into JSON file using
I have a JSON file which looks like the following: {"posts":[{"Latitude":"53.38246685","lontitude":"-6.41501535"}, {"Latitude":"53.4062787","lontitude":"-6.3767205"}]} and I
I have a php file somejson.php that echos a json encoded array {jsonone:first json,jsontwo:second
I have a PHP file which returns this: $data = pg_fetch_array($result); echo json_encode($data); And
I have a JSON file which contains data like the following: {"posts": [ {
I have a simple ajax query to a file which basically returns in JSON
I have a web service that queries data from this json file, but I
I have this swf (flash) file that provides the json that needs to be
I have an external file in php, outputed as json format I want the

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.