before anything i've been checking this post : How can I find matching values in two arrays? But it did not help me. I don't really get it. So maybe if I explain my problem here someone can help me to solve it.
I have a school project (I am supposed to match user regarding their location, tags , popularity score etc. Before using an algorithm for the two location I want a first non precise sort. So basically I want to compare two value like 'Paris' and 'Paris')
My search function returns me an [] with two {} inside, so there are two people that match regarding my first search values (gender)
I'm using Node.js, my database is MySQL and my function are using callback and promises so far.
So This is my first object (it contains my searcher's informations)
[ RowDataPacket {
id: 34,
username: 'natedogg',
latitude: 48.8835,
longitude: 2.3219,
country: 'France',
city: 'Paris',
zipcode: 75017 } ]
This is the second one (it contains 2 users)
[ RowDataPacket {
id: 33,
username: 'pablito',
latitude: 48.8921,
longitude: 2.31922,
country: 'France',
city: 'Paris',
zipcode: 75017 },
RowDataPacket {
id: 35,
username: 'tupac',
latitude: 48.8534,
longitude: 2.3488,
country: 'France',
city: 'levallois',
zipcode: 92300 } ]
No that I have this data how can I check if my searcher's location is == my otherUsersLocation (even if they are more than 1 location) Thank for your help !