I have a hash field in Mongoid document like < _id: 58a202d407953817ece2989c, d: {"a"=>"b", "c"=>"d"}>
i want to pop key a
from it so that hash filed contain only c
how to do this in mongoid?
Asked
Active
Viewed 147 times
1

K Scandrett
- 16,390
- 4
- 40
- 65

Aki Singh
- 11
- 1
1 Answers
0
if we consider
data = ..., d: {"a"=>"b", "c"=>"d"}, ...
then
data.d.delete("a")

Radha krishna
- 21
- 4