Hi,
I am trying to create a hashtable from JSON but not able to create a hashtable correctly in custom_fields_values section. Below is my code. Please help.
$JSON = @"
{
"hardware": {
"name": $Name,
"status": {
"name": "Operational"
},
"owner": {
"email": $Email
},
"custom_fields_values": {
"custom_fields_value": [
{
"name": "Deployment Status",
"value": "Repairs"
}
]
}
}
}
"@
$Hashtable = @{
hardware = @{
name = $Name
bio = @{
'ssn' = $SerialNumber
}
status = @{
'name' = "Operational"
}
owner = @{
'email' = $Email
}
custom_fields_values = @{
custom_fields_value = @{
'name' = "Deployment Status"
'value' = "Repairs"
}
}
}
}