Json to DataTable

Json to DataTable

meoldmeold Posts: 2Questions: 1Answers: 0
edited August 2017 in Free community support

Неllo!
I have a json data like this:
{
"name": 4,
"value": 10,
"children": [
{
"name": 40,
"value": 20,
"children": []
},
{
"name": 45,
"value": 50,
"children": []
},
{
"name": 47,
"value": 10,
"children": [
{
"name": 270,
"value": 30,
"children": []
},
{
"name": 358,
"value": 20,
"children": []
},
{
"name": 359,
"value": 10,
"children": []
}
]
}
]
}

I need a data table like this:

Answers

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395

    According to jsonlint your json is invalid.
    Also you need to supply more detail about your requirements.
    What is the significance of the indentation in your "name" field?
    How far have you got with your DataTable?

  • meoldmeold Posts: 2Questions: 1Answers: 0
    edited August 2017

    @tangerine thanks, i fix my json.
    The significance of the indentation in "name" field i can make with render function, and it isn't a problem(the value of the significance of the indentation is 4 &nbsp tags multiply by level of item)
    I only want to know how display json data in DataTable.
    Thanks!

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395

    How far have you got?
    There are plenty of simple examples to follow.

This discussion has been closed.