1

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?

K Scandrett
  • 16,390
  • 4
  • 40
  • 65
Aki Singh
  • 11
  • 1

1 Answers1

0

if we consider data = ..., d: {"a"=>"b", "c"=>"d"}, ... then data.d.delete("a")