Q:

Highcharts parse json string for x-axis grouped categories

I'm working on a project in asp c# and using Highcharts for reporting. 
I want to group the categories I have as a json string and I don't know how to push the data to x-axis categories.

[{
      "name": "CTS",
      "categories": ["01AT", "02AT", "03AT", "04AT", "06AT"]
  }, {
      "name": "340_HSC",
      "categories": ["02QHSC", "05QHSC", "07QHSC", "14QHSC"]
  }]

A:

Your json string contains proper data format to pass as xAxis categories. 
So pass your json string as
$(function () {

var jsond=[{ "name": "CTS", "categories": ["01AT", "02AT", "03AT", "04AT", "06AT"] }, { "name": "340_HSC", "categories": ["02QHSC", "05QHSC", "07QHSC", "14QHSC"] }];

    var chart = new Highcharts.Chart({
        chart: {
            renderTo: "container",
            type: "column"
        },
        title: {
            useHTML: true,
            x: -10,
            y: 8,
            text: '<span class="chart-title"> Grouped categories <span class="chart-href"> <a href="http://www.blacklabel.pl/highcharts" target="_blank"> Black Label </a> </span> <span class="chart-subtitle">plugin by </span></span>'
        },
        series: [{
            data: [4, 14, 18, 5, 6, 5, 14, 15, 18]
        }],
        xAxis: {
            categories: jsond
        }
    });
});

Fiddle demo

