It's super late and my mind is blanking right now, but let's say I have variable filename
and it's storing the name of another variable marker
. The variable marker
is an array and contains the object & property position: new google.maps.LatLng(42.2550,-114.3221)
.
I've been stupidly trying to access it via filename.position
which of course returns undefined, since it's searching the literal filename
for a 'position' property that does not exist.
But how could I pull marker.position
by using filename
? Is there some nifty jQuery trick for, uh, 'resolving' a variable to its contents? I'm brain fried. I know I've done this before.