I am trying to convert JSON array into single JSON Object.
Below is the output screenshot

I am using the below powershell script
$getdb_Conn=Invoke-Sqlcmd -ServerInstance $ServerName -Database 'master' -Username $UserName -Password $Password -Query $getdb
$deadlockDB=$getdb_Conn.Database_Name
$deadlockSP=$getdb_Conn.SP_Name
$deadlockTable_Name=$getdb_Conn.Table_Name
$deadlockTIMESTAMP=$getdb_Conn.TIMESTAMP
$Obj = [PSCustomObject]@{
Database = $deadlockDB
SP = $deadlockSP
Table = $deadlockTable_Name
TIMESTAMP = $deadlockTIMESTAMP
}
Write-Output ( $obj | ConvertTo-Json)
Please someone help me, on how to the get required output. I do not want the JSON in an array.
