jsnoob4ik,
сконвертируйте обьект в строку -- как это на php незнаю
а на js будет так
<!DOCTYPE HTML>
<html>
<head>
<title>Untitled</title>
</head>
<body> <div id="box"></div>
<script>
var data = {
"items": [
{
"id": "01",
"text": "TEXT",
"likes": {
"count": 1,
"can_like": 1
},
"date": 0000,
"comments": {
"count": 1,
"can_post": 1
},
"attachments": [
{
"type": "photo",
"photo": {
"photo_130": "http://1.jpg",
"date": 0000,
"id": 01
}
}
]
},
{
"id": "02",
"text": "TEXT2",
"likes": {
"count": 2,
"can_like": 2
},
"date": 0000,
"comments": {
"count": 2,
"can_post": 2
},
"attachments": [
{
"type": "photo",
"photo": {
"photo_130": "http://2.jpg",
"date": 0000,
"id": 02
}
},
{
"type": "photo",
"photo": {
"photo_130": "http://3.jpg",
"date": 0000,
"id": 03
}
},
{
"type": "photo",
"photo": {
"photo_130": "http://4.jpg",
"date": 0000,
"id": 04
}
}
]
}
]
}
document.getElementById("box").innerHTML=JSON.stringify(data);
</script>
</body>
</html>