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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T19:33:45+00:00 2026-06-05T19:33:45+00:00

I am pretty new to YUI and need some help. I have a JSON

  • 0

I am pretty new to YUI and need some help.

I have a JSON response like this:

{
    "Results":[
        {
            "alpha":57.935,
            "beta:{
                "delta":2.975,
                "omega":1.431
            },
            "gamma":{
                "theta":"0.339",
                "lambda":"1.195"
            }
        },
        {
            "alpha":87,
            "beta":{
                "lambda":2.680,
                "kappa":0.714
            },
            "gamma":{
                "zeta":"0.288",
                "epsilon":"0.289"
            }
        }
    ]
}

I would like to have a datatable with nested columns where:
1) alpha, beta and gamma are parent columns.
2) beta and gamma each have two columns formed of the JSON key-value pair (e.g., delta => 2.975).
3) The number of rows, i.e., total key-value pairs, is dynamic.

Basically, something like this:

    ----------------------------------------------
    | alpha   |      beta      |       gamma     |
    ----------------------------------------------
    | 57.935  |  delta | 2.975 |   theta | 0.339 |
    ----------------------------------------------
    |         |  omega | 1.431 |  lambda | 1.195 |
    ----------------------------------------------
    | 87.435  | lambda | 2.680 |    zeta | 0.288 |
    ----------------------------------------------
    |         |  kappa | 0.714 | epsilon | 0.289 |
    ----------------------------------------------

I have been able to generate non-nested, simple JSON responses.

My problems:
1) I have the object for each JSON child ({theta:0.339}, etc.). Both child columns will need data from this same object. How do I use it without modifying it? Should I use the same ‘keyName’ for both child columns in myColumnDefs?
2) How to create more than one rows where alpha td is empty?

Any help will be appreciated !

  • 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-05T19:33:47+00:00Added an answer on June 5, 2026 at 7:33 pm

    This is not an easy problem to solve. Barring your ability to format the JSON into individual rows before its sent to the client, you can hack together a solution using some column configurations, formatters, and a custom bodyView modelList attribute setter that flattens the data for display.
    http://jsbin.com/3/efigim/1/edit?javascript,live

    This would likely involve some breakage of table row -> data record associations since the bodyView’s modelList contains its own Models for the rows rather than sharing a clientId. This may or may not get in your way, depending on whether you need additional features.

    But since the DataTable’s data ModelList preserves the objects for beta and gamma values–only the view’s representation is customized–you might be fine.

    YMMV, HTH

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

Sidebar

Related Questions

I'm pretty new to JSON, javascript, YUI and trying to compelte a homework assignment.
Pretty new to threading and I have this QList that the threads share between
Am pretty new to ROR. Need help in Rails form validation. Am using rails
Pretty new to MVC and the like. I have a class the looks like
I pretty new to Objective-C (and C itself) and need to consume a NSData
I'm pretty new to WPF and using the MVVM design pattern. To help learn
pretty new to HTML and I was wondering why this snippet of code doesn't
Pretty new to all this, so if I am going about my puzzle in
Im pretty new to coding, heres my problem. Results->Text = G55 > Y +
I am pretty new to hibernate and I am stuck at this exception. As

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.