Getting Error with Get Task Rest API

Trying to get tasks by applying filter on process definition key using “processDefinitionKeyIn”

Making a Post Request at http://localhost:8080/engine-rest/task
with the body as follows:

{ "processDefinitionKeyIn":"semReg,deRegistration" }

Getting the following error:

{
“type”: “JsonMappingException”,
“message”: “Can not deserialize instance of java.lang.String[] out of VALUE_STRING token\n at [Source: org.apache.catalina.connector.CoyoteInputStream@9a68200; line: 2, column: 2] (through reference chain: org.camunda.bpm.engine.rest.dto.task.TaskQueryDto["processDefinitionKeyIn"])”
}

Try making a GET request with parameters in the URL itself:

http://localhost:8080/engine-rest/task?processDefinitionKeyIn=semReg,deRegistration

Get Request is working. But in the documentation the same is given for post which is not working

how do i send the In parameter in the POST API, i cant get the right format and keep getting the same error.
cannot GET as everything else is already coded using POST.
trying for processInstanceBusinessKeyIn in task history post api…

it seems we need to pass in this way-
“processInstanceBusinessKeyIn” : [“key1”,“key2”]