Provides the ability to filter an array of multi-level/complex objects by the definition provided.
Version 1
HTTP RequestPOST
/ado/v1/FilterObjectArray
Header
Parameter | Description |
---|---|
Ocp-Apim-Subscription-Key | The subscription key you received when you purchased a plan. |
Request Body
Mandatory
Parameter | Type | Description |
---|---|---|
data | object[] | Array of complex, multi-level objects. |
filter | string | A C# style string that performs the filter. Please see more information below on how this string should be constructed. |
Property Conversion
This operation works in a dynamic way, therefore, each property of the JSON payload that is being filtered on will need to be statically/strongly typed within the filter statement.
This is achieved via the use of the Convert
class in C#.
https://learn.microsoft.com/en-us/dotnet/api/system.convert
There are numerous methods available when it comes to converting from one value type to another but it is likely that only the core set will need to be utilised at any given time.
The core set of methods are listed below.
Convert.ToBoolean()
Convert.ToDateTime()
Convert.
ToDecimal()Convert.
ToDouble()Convert.
ToInt32()Convert.
ToInt64()Convert.
ToString()
For more information on built in data types within C#, please refer to this link … https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/built-in-types
You’re more than welcome to experiment and use the methods other than those listed above.
Please refer to the examples provided for more information on how to apply the conversion.
Comparison Operators
Comparison operators used in the filter process need to follow the C# syntax.
Operator | Explanation |
---|---|
== | Equals |
> | Greater Than |
< | Less Than |
!= | Not Equals |
>= | Greater Than or Equal |
<= | Less Than or Equal |
&& | And |
|| | Or |
Examples