jQuery와 구문 분석하려는 2MB JSON 개체가 있습니다. 전체 개체를 "timeline.js"라는 파일에 쏟아 부었습니다. 필자는 필요에 따라 레코드를 잡기 위해 데이터 세트를 파싱 해보기를 바라고 있습니다.jQuery로 외부 JSON 파일 구문 분석
내 데이터 세트가 XML 파일로 시작되었지만 jQuery를 사용하여 데이터를 가져 와서 DOM에 배치 할 때 JSON이 더 효율적이라고 읽었습니다.
다음은 내 개체의 첫 번째 레코드입니다. 1016의 'profileid'로 기록을 잡으려면 어떻게이 객체를 파싱합니까? 의
{
timeline:{
record:[
{
profileid:1016,
title:'Adam',
parentprofileid:0,
type:'Person',
minzoomlevel:29,
maxzoomlevel:66,
isapproxstart:1,
isapproxend:1,
startdate:-4181,
enddate:-3251,
shortdescription:'Name means "red" or "man" he is...',
article:'<div><span>The first member of...',
status:22,
scriptures:{
scripture:[
{
profileid:1016,
scripturetext:'Genesis 2:7',
referencetext:'Birth'
},
{
profileid:1016,
scripturetext:'Genesis 5:4',
referencetext:'Death'
}
]
}
},
이렇게함으로써,'code'을 -이 저장 메모리의 전체 JSON 객체 않는가? 또는 obj를 호출 할 때마다 JSON을 단순히 구문 분석합니까? – matthoiland