Json render in datatable

Json render in datatable

ashish.bishtashish.bisht Posts: 1Questions: 0Answers: 0
edited November 2021 in Editor

I am having a json below I want to render cluster_1_statement_data.Demographic_Details.template_label. but while i am rendering it it didn't show anything.
and their are some dropdown value I want to use them as a select option how can I do that?

{
"data": [
    {
    "queue_id": 1,
    "cluster_1_statement": [
        "Demographic Details"
    ],
    "header": {
        "template_label": "Template Label",
        "template_label_id": "Template Label ID",
        "values": [
            "Period 1",
            "Period 2"
        ]
    },
    "cluster_1_statement_data": [
        {
            "Demographic_Details": [
                {
                    "template_label": "Auditor Opinion",
                    "template_label_id": 804.0,
                    "values": [
                        "Audited",
                        "Unaudited"
                    ],
                    "ids": [
                        1,
                        2
                    ],
                    "is_relevant": [
                        false,
                        true
                    ],
                    "field_type": "drop_down",
                    "drop_down_values": [
                        "Unqualified",
                        "Qualified"
                    ]
                },
                {
                    "template_label": "Scale",
                    "template_label_id": 801.0,
                    "values": [
                        "",
                        ""
                    ],
                    "ids": [
                        3,
                        4
                    ],
                    "is_relevant": [
                        false,
                        true
                    ],
                    "field_type": "drop_down",
                    "drop_down_values": [
                        "Actuals",
                        "Thousands",
                        "Millions",
                        "Billions"
                    ]
                },
                {
                    "template_label": "Source Currency",
                    "template_label_id": 804.01,
                    "values": [
                        "INR",
                        "INR"
                    ],
                    "ids": [
                        5,
                        6
                    ],
                    "is_relevant": [
                        false,
                        true
                    ],
                    "field_type": "drop_down",
                    "drop_down_values": [
                        "AUD",
                        "BWP",
                        "CAD",
                        "CNY",
                        "GHS",
                        "INR",
                        "JPY",
                        "KES",
                        "MUR",
                        "MZN",
                        "SCR",
                        "ZAR",
                        "TZS",
                        "UGX",
                        "GBP",
                        "USD",
                        "ZMW"
                    ]
                },
                {
                    "template_label": "Statement Period",
                    "template_label_id": 802.0,
                    "values": [
                        "2099-12-31",
                        "2017-12-31"
                    ],
                    "ids": [
                        7,
                        8
                    ],
                    "is_relevant": [
                        false,
                        true
                    ],
                    "field_type": "date_picker",
                    "drop_down_values": ""
                },
                {
                    "template_label": "Statement Type",
                    "template_label_id": 803.0,
                    "values": [
                        "Annually",
                        "Annually"
                    ],
                    "ids": [
                        9,
                        10
                    ],
                    "is_relevant": [
                        false,
                        true
                    ],
                    "field_type": "drop_down",
                    "drop_down_values": [
                        "Annually",
                        "Quarterly",
                        "Half Yearly",
                        "1 Mo Interim",
                        "2 Mo Interim",
                        "3 Mo Interim",
                        "4 Mo Interim",
                        "5 Mo Interim",
                        "6 Mo Interim",
                        "7 Mo Interim",
                        "8 Mo Interim",
                        "9 Mo Interim",
                        "10 Mo Interim",
                        "11 Mo Interim",
                        "TTM",
                        "Projection"
                    ]
                }
            ]
        }
    ]
}
]
}

Edited by Kevin: Syntax highlighting. Details on how to highlight code using markdown can be found in this guide

Replies

  • kthorngrenkthorngren Posts: 20,296Questions: 26Answers: 4,768

    but while i am rendering it it didn't show anything.

    How are you rendering the JSON?

    You didn't post any Datatables code, are you using Datatables?

    Kevin

  • colincolin Posts: 15,143Questions: 1Answers: 2,586

    We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

Sign In or Register to comment.