how to compare javascript object and remove property are different code example Example: nodejs delete object key delete obj.firstname;