Six Stars

Condition in cMessageRouter

My JSON inside the Body looks like this

 

{
	"contract_number": "ES-IVE-2017/1_C",
	"delivery_year": "2017",
	"internal_model_calculation_id": "10",
	"operation": "delete"
}

And it goes through the cMessageRouter. I would like the router to let through the message that contains internal internal_model_calculation_id and operation = 'delete'.

How can I create the JSONPath to implement this condition?

Curently this is what I thought it will work, but it doesn't:

"$[?({$.operation} == 'delete' && @.internal_model_calculation_id)]"

 

1 ACCEPTED SOLUTION

Accepted Solutions
Eight Stars

Re: Condition in cMessageRouter

Hi,

 

Could you try with:

"$[?(@.operation=='delete' && @.internal_model_calculation_id)]"

 

Eric

1 REPLY
Eight Stars

Re: Condition in cMessageRouter

Hi,

 

Could you try with:

"$[?(@.operation=='delete' && @.internal_model_calculation_id)]"

 

Eric