У меня есть список Html, я получаю данные в виде JSON-словаря из вызова REST, я перехожу и получаю их значения. Но я не мог найти, как сгенерировать Html ниже с элементами в цикле.
<div class="container">
-
<div class="date">20-12-2012</div>
<div class="ammount">-€4,25</div>
-
<div class="place">data</div>
<div class="category">data</div>
<div class="description_title">data</div>
<div class="description">data</div>
//repeat this for multi items received from REST
$.ajax
({
success: function (data){
var transactions=data['transactions'];
$.each( transactions, function( key, value ) {
$.each( value, function( key, value) {
//here how to set/create the appropriate div elements(like above)
//with the values I get here in a loop?
});
});
EDIT some solutions below is fine, but I dont want all the values from my object array, how can I get only these items(date, amount, place..etc) to the html div and ignore other items in the dictionary