Quantcast
Channel: Free community support — DataTables forums
Viewing all articles
Browse latest Browse all 35273

Columns.data format for this particular scenario

$
0
0

Hi, I am trying to consume such an API response:

{
   "data": 
     {
      "a":
        {"b": 1},
      "c":
        {"d": 2}
     }
}

I would like to display it as :

| Some Name | Other Name | Count |
-----------------------------------------------
| a                   | b                  | 1         |
| c                   | d                  | 2         |

Note that "a", "b", "c", "d" are not the constant keys, they are variable. I know that "dataSrc": "data" is the must here but I am unable to parse the nested object. Any advice ?


Viewing all articles
Browse latest Browse all 35273

Trending Articles