how to delete an array value from hash table

Hi All,

roles : {@{databaseName=sales; roleName=readWrite}, @{databaseName=marketing; roleName=read}}

I tried uwith below 3 attempts to delete databasename=marketing , roleName=read from roles , but could not.

#if my input $dbname = "marketing"
if ($atlasdbname -eq $dbname)
1) $rol = $rol.Remove @{databaseName=$dbname;roleName=$rolename}
2) $rol = $rol.Remove('databaseName','roleName')
3)$rol['databaseName'] = ($rol['databaseName'] | ?{$_ -ne '$dbname'})
I want to delete an entry from hash table($rol) with values , databaseName=marketing and roleName=read can you please let me know the issue with above code .
i also tried , Cast it to [System.Collections.ArrayList], which is mutable, then remove an element from it:
$rol = [System.Collections.ArrayList]$rol
$rol = $rol.Remove('marketing','read')
That did not work either
Thank you

It is resolved with below command

$rolnew = $rol | ? {$_.databaseName -ne $dbname}