Hello all, I'm attempting to construct a QueryExpression in javascript with a ConditionExpression. The ConditionExpression object contains 3 properties- AttributeName, Operator, and Values. The Values property is an array of objects. I'm having trouble figuring out how the Values array objects must be constructed for it to be consumed by the API properly. Without a ConditionExpression the call I'm making is successful.
Conditions: [ { AttributeName: "activitytypecode", Operator: ConditionalOperator.In.toString(), Values: [ "4201" ] } ]
A node of type 'PrimitiveValue' was read from the JSON reader when trying to read the entries of a typed resource set;
however, a node of type 'StartObject' or 'EndArray', or a null value, was expected.
I know the Values objects must be defined somehow like this (this does not work):
[ { "@odata.type": "Edm.String", "@odata.value": "4201" } ]
In C# creating a condition expression is trivial
new ConditionExpression("activitytypecode", ConditionOperator.In, new String[] {"4201"})
My next step is to setup everything up in C# and see how it serializes this into the URL. I'm trying to avoid that. Could anyone shed some light on this?
Any help is greatly appreciated, thank you.
*This post is locked for comments