how to seperate loop array values in different arrays

how to seperate loop array values in different arrays

Hi I am trying to display multiple arrays like this ["A,","B"] in next line ["A"]
when check box is selected. But I am getting error in firebug like this.. (plz see below image)


[{
        "acdyr1": "2012",
        "acdyr2": "2013",
        "med": "kan",
        "type_of_skl":"STATE",
        "class_section": [ {
                "standard": "UKG",
                "sec": ["A"]
            }, {
                "standard": "C1",
                 "sec": ["A","B"]
            }]
      
              
    }]