Pulling my hair out here, i know it' the structure of how JSOn works.
There is a multidimensional array that is undefined from a web API. structure is
{
"totalCount": 30,
"entries": [{"title": "item1","description": "your amazing item 1"}],
"price": [{"value": "$23.34","discount": "none"}],
"newINfo" = 20
},
{
"entries": [{"title": "item2","description": "your amazing item 2"}],
"price": [{"value": "$23.34","discount": "none"}],
"newINfo": = 50
},
Jquery > if i set $.each(data, to> $.each(data.entires and remove the entires from where its called on the content string, it works one at a time, but then the array items are not linked.
$.getJSON('/theWebApi', function (data) {
var content = '';
$.each(data, function(i, object) {
content += '<div>' + object.entires.title + '</div>';
content += '<div>' + object.price.value + '</div>';
});
$(content).appendTo(".test")
});
"newINfo" = 20should be"newINfo" : 20