I tried to use the following filter:
[{“filters”:[{“propertName”:“rating”,“value”:[“258”],“operator”:“IN”}]}]
I received the following error:
Invalid input JSON on line 1, column 679: Cannot deserialize value of type `java.lang.String` from Array value (token `JsonToken.START_ARRAY`)
If I used the EQ operator it worked as expected.
[{“filters”:[{“propertyName”:“rating_unit”,“value”:“MINUTES”,“operator”:“EQ”}]]
What did I do wrong? What is the correct JSON value?
@yorambaron - by a strange cooincidence I tripped over this yesterday myself!
There seems to be a trick to the use of IN which requires the use of ‘values’ rather than ‘value’ in the filter setup.
Good luck!
Steve
Hi Steve,
Thank you so much, it solved the problem.
Hi @yorambaron
"IN operator is used when we need to search among different values if you need "“258"” only then you can use the EQ ot CONTAINS.
Although IN is also allowed value so if there is only one value then you can remove the array and try it again, it should work as per requirement."
I hope this will help you out. Please mark it as Solution Accepted and upvote to help another Community member.
Thanks!
The solution is to use “values” instead of “value” keyword as provided by Steve.