I have a search application that gets a list of places. These locations and names will be in a attribute tag such as
<div data-location="22.4245,-15.000" data-id="place_name_1">Place Name 1</div>
<div data-location="23.4435,-13.000" data-id="place_name_2">Place Name 2</div>
<div data-location="27.42755,-13.000" data-id="place_name_3">Place Name 3</div>
And I'm using this information to get markers in Google Maps. I'm looking at their documentation and I was wondering how do I get this information into an array in javascript? If you look at the link, there's an array like so:
var beaches = [
['Bondi Beach', -33.890542, 151.274856, 4],
['Coogee Beach', -33.923036, 151.259052, 5],
['Cronulla Beach', -34.028249, 151.157507, 3],
['Manly Beach', -33.80010128657071, 151.28747820854187, 2],
['Maroubra Beach', -33.950198, 151.259302, 1]
];
What would I need to do to get data from html to array in javascript?
Thanks!