How to remove subfield using ruby

Thank you . It worked but 'remove' is not available for hash instead using 'delete' as below worked.

code => "
event['outputdata'].keys.each { |k|
event['outputdata'].delete(k) if k.start_with?('ID')
}

Thanks