@Johnny B Bad Thanks for reaching out. I have reproduced your issue and I have noticed similar issue, so I modified provided code as when you are converting request body to PowerShell Object, its being stored as Ordered Hash table in Azure functions editor. Accordingly, I have modified the code.
Here is code and respective output for your reference.
using namespace System.Net
# Input bindings are passed in via param block.
param($Request, $TriggerMetadata)
# Write to the Azure Functions log stream.
Write-Host "PowerShell HTTP trigger function processed a request."
# Convert the request body from JSON to a PowerShell object
$data = $Request.Body
$cloneData = $data.Clone()
# Loop through the properties of the JSON data and remove keys starting with "SYSTEMCOLUMN_"
$data.GetEnumerator() | ForEach-Object{
if ($_.key -like "SYSTEMCOLUMN_*")
{
$cloneData.remove($_.key)
}
}
# Convert the modified data back to JSON
$updatedJson = $cloneData | ConvertTo-Json -Depth 100
# Associate values to output bindings by calling 'Push-OutputBinding'.
Push-OutputBinding -Name Response -Value ([HttpResponseContext]@{
StatusCode = [HttpStatusCode]::OK
Body = $updatedJson
})