Добрый день. Есть верстка:
<div class="google-map-marks">
<div class="google-map-center"><span class="latitude">57.71626291400055</span><span class="longitude">43.94435294999994</span></div>
<div class="marker"><span class="latitude">60.207426504475734</span><span class="longitude">35.94630607499994</span><span class="delet"></span></div>
<div class="marker"><span class="latitude">60.81312576191666</span><span class="longitude">61.43458732499994</span><span class="delet"></span></div>
<div class="marker"><span class="latitude">45.660621650435466</span><span class="longitude">52.64552482499994</span><span class="delet"></span></div>
<div class="marker"><span class="latitude">45.537632112877695</span><span class="longitude">79.01271232499994</span><span class="delet"></span></div>
<div class="marker"><span class="latitude">57.196191095006554</span><span class="longitude">79.36427482499994</span><span class="delet"></span></div>
</div>
Нужно на jQuery собрать данные со всех элементов и создать json строку:
"contents": [
{
"id": 1,
"lat": 57.71626291400055,
"lng": 43.94435294999994
},
{
"id": 2,
"lat": 60.207426504475734,
"lng": 35.94630607499994
}
],