I am stuck in a situation where I need to find missing key in the hash. But the problem is key is not certain it can be any key out of certain keys.
For example
{"from"=>"abc@gmail.com", "to"=>"def@gmail.com:ijk@gmail.com:lmn@gmail.com", "subject"=>"hi", "body"=>"there", "cc" => "def@gmail.com:ijk@gmail.com", "bcc" => "def@gmail.com:ijk@gmail.com"}
Missing keys can be from, subject, to, body but not cc and bcc. So I need to find out which of the keys are missing in a hash in order to return the specific key to the user. I cannot do this at the model level This solution provided in this link is not helpful because it is just returning me true or false. Instead of that, I need the missing keys which are not present in my hash