Javascript 使用jquery访问c#对象列表

Javascript 使用jquery访问c#对象列表,javascript,jquery,json,Javascript,Jquery,Json,我不明白为什么我不能访问结果元素 返回的内容: [{"customSurfaceMaster": {"CSMasterID":1,"CSName":"Q17","QuestionId":12,"OpType":"22","OpFlag":null,"ChartType":"Bar"},"UserCSID":1,"UserId":2,"CSMasterID":1,"PeriodType":null,"PeriodStartValue":null,"PeriodEndValue":null,"I

我不明白为什么我不能访问结果元素

返回的内容:

[{"customSurfaceMaster":   {"CSMasterID":1,"CSName":"Q17","QuestionId":12,"OpType":"22","OpFlag":null,"ChartType":"Bar"},"UserCSID":1,"UserId":2,"CSMasterID":1,"PeriodType":null,"PeriodStartValue":null,"PeriodEndValue":null,"ImpLevel":1,"DisplayOrder":1,"Visible":true}]
正在尝试访问此处:

var Tile = BindTiles(result.customSurfaceMaster.chartType, result.customSurfaceMaster.CSname, result.ImpLevel);
错误:

 result.customSurfaceMaster is undefined
试试这个:

var Tile = BindTiles(result.customSurfaceMaster[0].chartType, result.customSurfaceMaster[0].CSname, result.ImpLevel);

这是一个数组,应该是
result[0]。customSurfaceMaster
…如果您是JSON新手,可能会有所帮助。你可以看出它是一个数组,因为它周围有方括号,
[]
,然后是一个对象,使用弯曲的括号,
{}
。我很乐意帮忙……我通常也用这种方式构建json文档……现在我正在使用类似json的
$(“#curso”).html(data.curso[0].asignatura)