How to get rid of the "ConvertFrom-Json powersFell: Invalid JSON" error

        $ FX_USER = $ args[0]
  $ FX_PWD = $ args[1]
  $ FX_JOBID = $ args[2]
  $ REGION = $ args[3]
  $ TAGS = $ args[4]
  $ SUITES = $ args[5]
  $ CATEGORIES = $ args[6]
  $ FX_HOST = $ args[7]      

  $ taskStatus = "WAITING"
Write-Host "taskStatus =" $ taskStatus


while (("$ taskStatus" -eq "WAITING") -or ("$ taskStatus" -eq "PROCESS"))
{
to sleep 5
Write-Host "Check Status ...."

$ passPercent = $ (curl -k --header "Content Type: application / json; charset = UTF-8" -X GET -u "" $ {FX_USER} ":" $ {FX_PWD} "" "" $ { FX_HOST} "/ api / v1 / runs / $ {runId}" | jq -r & # 39;. "Data" | .ciCdStatus & # 39;)


$ array = $ passPercent | ConvertFrom-json

$ taskStatus = "$ {array[0]} "
Write-Host "task-status = $ taskStatus"
Write-Host "Status =" "$ {array[0]} "" Success rate = "" $ {table[1]} "" Total Tests = "" $ {array[2]} "" Time Taken = "" $ {array[4]} "" Run = "" $ {array[5]} "    

when i execute this powershell code i got an error output from the console.

ConvertFrom-Json: Invalid JSON primitive: WAITING.
To C: Users Administrator test.ps1: 57 characters: 45
+ $ array = $ passPercent | ConvertFrom-json
+ ~~~~~~~~~~~~~~~~~
+ CategoryInfo: NotSpecified: (:) [ConvertFrom-Json], ArgumentException
+ FullyQualifiedErrorId: System.ArgumentException, Microsoft.PowerShell.Commands.ConvertFromJsonCommand

Status = Percentage of Success = Total Number of Tests = Time Required = Execute =

I am supposed to get values ‚Äč‚Äčeither in string or in integer after = sign in to the fields above such as Status = Complete,
Someone can help me with his urgency.
Thank you