problem in ajax

hi there

i have these codes in my view:




header('Content-type: application/json');

echo yii\helpers\Json::encode($classlist);



what i retrieve from direct access from the view is this(that is true and what i exactly expected):




[{"id":"2","title":"term2"},{"id":"3","title":"term3"}]



but when use "jQuery.parseJSON(result);" in a successful ajax request, the firefub show this to me:




 [Object { id="2", title="term2"}, Object { id="3", title="term3"}]

index.p.../create (line 450)

SyntaxError: JSON.parse: unexpected character at line 1 column 2 of the JSON data

        


return JSON.parse( data + "" );




thanks in advanced