i have a JSON api. simple example is in picture
all i want to do is add object from JSON to array. like in this example
[{title: 'Marker 1', lat: '40.371268', lang: '49.840576', id: '1', icon 'ico.png'},{ title: 'Marker 2', lat: '40.371268', lang: '49.840576', id: '2', icon 'ico.png'} ]
but when i use this code
$.getJSON('apiJson.php')
.done(function(data){
randomMarkers.push(Object.values(data));
})
console.log(randomMarkers);
i get Array in Array ... cant find how to figure it out.
i need an array with object came from outer JSON
sorry for my english.