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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T18:57:20+00:00 2026-05-16T18:57:20+00:00

Is there a way to handle data structures using JSON object in a way

  • 0

Is there a way to handle data structures using JSON object in a way of Key/ Value pairs?
If so can some one elaborate how to access associated value object from the key

Assume that I have something like this

KEY1 |  VALUE OBJECT1 - (NAME: "XXXXXX", VALUE:100.0)  
KEY2 |  VALUE OBJECT2 - (NAME: "YYYYYYY", VALUE:200.0)  
KEY3 |  VALUE OBJECT3 - (NAME: "ZZZZZZZ", VALUE:500.0)  
  • 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-16T18:57:22+00:00Added an answer on May 16, 2026 at 6:57 pm

    A “JSON object” is actually an oxymoron. JSON is a text format describing an object, not an actual object, so data can either be in the form of JSON, or deserialised into an object.

    The JSON for that would look like this:

    {"KEY1":{"NAME":"XXXXXX","VALUE":100},"KEY2":{"NAME":"YYYYYYY","VALUE":200},"KEY3":{"NAME":"ZZZZZZZ","VALUE":500}}
    

    Once you have parsed the JSON into a Javascript object (called data in the code below), you can for example access the object for KEY2 and it’s properties like this:

    var obj = data.KEY2;
    alert(obj.NAME);
    alert(obj.VALUE);
    

    If you have the key as a string, you can use index notation:

    var key = 'KEY3';
    var obj = data[key];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 539k
  • Answers 539k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I think you want image/jpeg instead of text/jpeg for your… May 17, 2026 at 2:15 am
  • Editorial Team
    Editorial Team added an answer Add this to your stylesheet: #left_menu ul li a {… May 17, 2026 at 2:15 am
  • Editorial Team
    Editorial Team added an answer I see you're adding a second data set and renderer… May 17, 2026 at 2:15 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I'm currently using XmlSerializer to, surprisingly enough :), handle de/serialization of my data structures
What is a good way to handle iOS 4 app termination when using an
Just after some opinions on the best way to achieve the following outcome: I
I am basically trying to retrieve some data from a MySql server, and display
I have a growing set of Excel spreadsheets none with the same data structure.
I'm wondering if there are any good guides or books that explain the best
I'm currently using SAX (Java) to parse a a handful of different XML documents,
I have a complex data structure (user-defined type) on which a large number of
The setup: (using Asp.Net MVC 2 RC, Entity Framework, SQL Server, VS2008) My buddy
I'm currently writing a PyGTK application and I'd like some advice as to 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.