There are a lot of posts on this, but my JS chops are quite there yet to figure out a solution for my case.
I have two arrays, one is a hardcoded array (Array2 in screenshot) of Google Lat/Lng variables and the other is an array constructed by iterating over DOM elements(Array1 in screenshot). I need to compare Array2 against the dynamically created Array1 from DOM and create a new Array3 of only the Array2 objects that are found in Array1. This will be the array I iterate over to create Map Markers. Below are my code samples.
Array1
var gdata = new Array();
$("table tbody tr:gt(0)").each(function (i) {
gdata[i] = new Array();
$(this).children('td').each(function (ii) {
gdata[i][ii] = $(this).text();
});
});
Array2
var markers = [
['a0', 32.840801, -117.244842],
['a10', 32.840801, -117.244842],
['a20', 32.840777, -117.244864],
...
]
