jeudi 26 mars 2015

ExpressJS : Strange String Comparation

I'm doing this:



res.jsonp({
userId: user._id,
spotUserId: spot.user._id,
condition: (user._id === spot.user._id)
});


And the result is this:



{
"userId": "551192836bff030fb657777c",
"spotUserId": "551192836bff030fb657777c",
"condition": false
}


I don't understand why the condition is false... Help me!


Aucun commentaire:

Enregistrer un commentaire