As already noted in the comments, json is not valid. Valid it will be in this form
{"2":{"title":"1","content":"2"},"1":{"title":"\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0430\u0439\u0442\u0430.","content":"\u041d\u043e\u0432\u044b\u0439 \u0434\u0438\u0437\u0430\u0439\u043d \u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f "}}
In order to display this json in a loop, you need to apply something like this
.title { font-weight: bold; }
<div id="container"></div> <script type="text/javascript"> // Тут получаем json var data = '{"2":{"title":"1","content":"2"},"1":{"title":"\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0430\u0439\u0442\u0430.","content":"\u041d\u043e\u0432\u044b\u0439 \u0434\u0438\u0437\u0430\u0439\u043d \u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f "}}'; var dataObject = JSON.parse(data); var container = document.getElementById('container'); for (var k in dataObject) { container.insertAdjacentHTML('beforeend', '<div class="title">'+dataObject[k].title+'</div><div class="content">'+dataObject[k].content+'</div>'); } </script>
Despite the fact that you are asking to make several elements with the same ID, I gave an example with the class instead of id, because there should not be several identical id in the same html document.