Now we check if both unordered_maps are same of not .
for ( const [ key , value ] of Object . entries ( m1 ) ) { if ( ! m2 . hasOwnProperty ( key ) m2 [ key ] != value ) return false ; } return true ; }