Reputation: 3756
If I had a javascript object with the values of
{"__v":0,"_id":"528277c808cab8ac2b000001","password":"password",
"userId":5,"userName":"Austinsss","$$hashKey":"00F"}
How could I remove "$$hashKey":"00F" out of the object entirely.
Upvotes: 0
Views: 80
Reputation: 101543
Use delete
(MDN):
var foo = {"__v":0,"_id":"528277c808cab8ac2b000001","password":"password",
"userId":5,"userName":"Austinsss","$$hashKey":"00F"};
delete foo.$$hashKey;
You could also use bracket notation if you have keys with odd characters in them:
delete foo['$$HashKey'];
Upvotes: 3