Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

192
Views
compare specific values from objects with different keys Javascript

This is a silly question, but nothing I try works. I have two objects nft and web3.givenProvider. Both contain an address as "0x0000000000000", but they are under separate keys. nft is under .seller and web3 is under .selectedAddress. Whenever I try to compare them using _.isEqual or toString it returns false even though the values are correct. I am not sure what I am missing here. I have even tried converting to an array and trying to _.find the address in the array, but that returned false.

// removed question mark
console.log(nft.seller === web3.givenProvider.selectedAddress))

NFT console.log() NFT console.log

Web3 console.log() Web3 console.log

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

They dont equate to each other because NFT has upper case letters while Web3 has all its letters on lowercase. If both values should be case insensitive, convert both to the same case (lower/upper) then compare them.

Sample:

console.log(nft.seller.toLowerCase() === web3.givenProvider.selectedAddress.toLowerCase())
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!