내 페이지에 뉴스 기사 목록을 포함시키고 json 파일에 대한 링크를 제공하려고합니다. json 파일의 데이터를 html로 변환하고 싶습니다. 아래는 json 구조가 어떤 모습인지 샘플을 나열한 것입니다 (외부 서버의 json 파일에 있지만 단순함을 위해 여기에 스 니펫을 포함 시켰습니다). json 파일의 데이터를 아래 테이블 구조처럼 html로 렌더링하려고합니다. jQuery (JSON2HTML - http://json2html.com/)로이 작업을 수행하려고 시도했지만 알아낼 수는 없습니다. 어떤 도움을 주시면 감사하겠습니다!json을 html로 변환
<table>
<tr class="header">
<td colspan="2">name from company</td>
<td class="alignR">page 1 of total pages (total from hits)</td>
</tr>
<tr>
<td class="colOne">Here I want the publishedAt data</td>
<td class="colTwo">Here I want the summary data</td>
<td class="colThree">Here I want the source data</td>
</tr>
<tr class="footer">
<td colspan="3">(list pages) <a href="#">1</a> <a href="#">2</a> <a href="#">3</a> <a href="#">4</a> <a href="#">5</a> <a href="#">6</a> <a href="#">7</a> <a href="#">8</a> <a href="#">9</a> <a href="#">10</a> <a href="#">Next</a></td>
</tr>
</table>
{
"company":{
"registrationNumber":1234567890,
"name":"Lorem Ipsum Name"
},
"search":{
"from":"2012-08-19",
"to":"2012-09-18",
"languages":"eng",
"mediaChannels":"web,print"
},
"hits":{
"page":1,
"perPage":20,
"total":123,
"articles":[
{
"id":1111111111,
"title":"Lorem Ipsum title 1",
"publishedAt":"2012-09-04T14:30:09+02:00",
"summary":"Lorem ipsum dolor sit amet 1",
"source":{
"id":12111,
"name":"the source name"
},
"url":"http://myurl.com/articles/1535585834",
"openAccessUrl":"http://myurl.com/open_access/d4f2a56a6dc1da563f90/articles/1535585834-f2b64530e4c6be0a2321d57b4870dd7a3f8952df"
},
{
"id":2222222222,
"title":"Lorem Ipsum title 2",
"publishedAt":"2012-09-05T14:30:09+02:00",
"summary":"Lorem ipsum dolor sit amet 1",
"source":{
"id":12121,
"name":"the source name"
},
"url":"http://myurl.com/articles/1535585834",
"openAccessUrl":"http://myurl.com/open_access/d4f2a56a6dc1da563f90/articles/1535585834-f2b64530e4c6be0a2321d57b4870dd7a3f8952df"
},
{
"id":3333333333,
"title":"Lorem Ipsum title 3",
"publishedAt":"2012-09-06T14:30:09+02:00",
"summary":"Lorem ipsum dolor sit amet 1",
"source":{
"id":12345,
"name":"the source name"
},
"url":"http://myurl.com/articles/1535585834",
"openAccessUrl":"http://myurl.com/open_access/d4f2a56a6dc1da563f90/articles/1535585834-f2b64530e4c6be0a2321d57b4870dd7a3f8952df"
},
]
}
}