jonas
jonas

Reputation: 1652

OData Query: Getting several rows based on a column criteria

I have a table that holds an attribute field and its corresponding value. For an instance several attributes are applicable, and I would like to return a specific set of attributes for this instance.

    |Attribute|Value|
    ----------
    | A       | 1   |
    ----------
    | B       | 2   |
    ----------
    | C       | 3   |
    ----------

How can I query with Odata to get attribute A and C and their corresponding values?

As of now I'm only able to get a single row with $filter=endswith(Attribute, 'A').

Upvotes: 0

Views: 688

Answers (1)

cuongle
cuongle

Reputation: 75306

You can simply add more filters with or operator on ODATA query, something like this:

$filter=(endswith(Attribute, 'A') or endswith(Attribute, 'C'))

Upvotes: 1

Related Questions