i have an array of hashes
arr = [
{ :tap=> "bucket", :mobile=> "charger", :apple=> "knife", :gifted => "true" },
{ :tap=> "bucket", :mobile=> "charger", :apple=> "knife" },
{ :tap=> "bucket", :mobile=> "charger", :apple=> "knife" },
{ :tap=> "bucket", :mobile=> "charger", :apple=> "knife", :gifted => "true" }
]
I am trying to sort the array hashes on the basis of :gifted=> "true". like this
sorted = [
{ :tap=> "bucket", :mobile=> "charger", :apple=> "knife", :gifted => "true" },
{ :tap=> "bucket", :mobile=> "charger", :apple=> "knife", :gifted => "true" }
{ :tap=> "bucket", :mobile=> "charger", :apple=> "knife" },
{ :tap=> "bucket", :mobile=> "charger", :apple=> "knife" }
]