I have this array that I add objects to:
waypts.push({location: location.lat() + "," + location.lng()});
How can I get the literal value it saves? With Object.value
and valueOf
does not do what I pretend
I have this array that I add objects to:
waypts.push({location: location.lat() + "," + location.lng()});
How can I get the literal value it saves? With Object.value
and valueOf
does not do what I pretend
I think the cleanest thing to do would be to use map :
Edit : After @LPZadkiel's comment I leave his solution here to make it more visible. You can directly access the location property of the object like this: