How can I convert/use this JSON on a collapse DataTable table/data?

How can I convert/use this JSON on a collapse DataTable table/data?

saulobsaulob Posts: 1Questions: 1Answers: 0
edited May 2016 in Free community support

That's it, what's the easy way to do it?

I get this info on a JSON. Is there any way to use as DataTable (with collapse rows in the children) data

Thanks

Small sample:

#

{
    children: [{
                NOME: "USER ONE ",
                VEND: "",
                SUPER: "",
                GEREN: "",
                FATMES: 7252516,
                FATDIA: 582402,
                CARTEIRA: 1131493,
                CARTDIA: 478889,
                META: 18403927.34,
                PORC: 39.407436608582,
                SUM: 8384009,
                PORCCART: 45.555542820351,
                iconCls: "task",
                expanded: false,
                children: [{
                    NOME: "CHILDREN FROM USER ONE ",
                    VEND: "",
                    SUPER: "",
                    GEREN: "",
                    FATMES: 3096549,
                    FATDIA: 229843,
                    CARTEIRA: 606084,
                    CARTDIA: 231966,
                    META: 7230174.39,
                    PORC: 42.828137095598,
                    SUM: 3702633,
                    PORCCART: 51.210839466349,
                    iconCls: "task",
                    expanded: false,
                    children: []
                }, {}, {}, {}]
            }, {
                NOME: "USER TWO",
                VEND: "",
                SUPER: "",
                GEREN: "",
                FATMES: 6215562,
                FATDIA: 387450,
                CARTEIRA: 421463,
                CARTDIA: 245420,
                META: 13929060.31,
                PORC: 44.622981462272,
                SUM: 6637025,
                PORCCART: 47.648763464935,
                iconCls: "task",
                expanded: false,
                children: [

(... more users and children here ...)

#

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

Answers

  • allanallan Posts: 63,794Questions: 1Answers: 10,514 Site admin

    DataTables only supports one level of child rows, but I don't immediately see any problem with using the above. What have you tried?

    Allan

This discussion has been closed.