var employees ='{"skills":[{"category":"JavaScript","tests":[{"name":"One","score":90}, {"name":"Two","score":96}]},{"category":"CouchDB","tests":[{"name":"One","score":79},"name":"Two","score":84}]}]}';
JQuery와
var obj = jQuery.parseJSON(employees);
for(i=0; i<obj.skills[0].tests[0].length; i++)
{
alert(obj.skills.tests.name[i]);
}
안녕하세요 출력이 "한 90 이 96" 은 내가 원하는 것입니다 원하는 경고에 ul li에 경고하거나 인쇄하기위한 첫 번째 테스트 값. 아무도 나를 도와주세요.
'경고 (obj.skills [0] .tests [0] .name을은 [내가]);'놓친'[0]' – Satpal
@Satpal는 더는이 – MV1
를 작동하지 않는 첫 번째는 JSON이 없다 유효하지. [{ "skill": "{"category ":"JavaScript ","tests ": [{"name ":"One ","score ": 90}, {"name ":"Two " ","score ": 96}]}, {"category ":"CouchDB ","tests ": [{"name ":"One ","score ": 79}, {"name ":"Two " "score": 84}]}]' –