For dropoff() in my pset8 code I'm stuck at the following line
//find house in range
for (var i in HOUSES)
if in range
// iterate over seats
for (var j in shuttle.seats)
----> if (shuttle.seats[j].house == HOUSES[i]) <-----
Here I get stuck...
I found the house that is in range, by iterating over the HOUSES array and check if HOUSES[i] is in the 30 metres range.
If so, I should compare the .house value of each seated passenger to the house in the HOUSES array that is in range.
How do I do that??
HOUSES[i] returns the whole structure (.lat and .lng)
I want to compare the shuttle.seats[j].house value to the name/key of HOUSES[i]...
Is there a way?