Skip to main content
patriciam905
October 30, 2023
Question

Web Api

  • October 30, 2023
  • 2 replies
  • 0 views

Hi,

I have a question, im creating a web api to return data from a query and i have to remove a column from the response.

For example:

I have an expression rule to bring me all the centers we have and it returns  "id" : null, "address" : "null", "officeName" : "null", "countryId" : null, "isAvailable" : true

How can i remove the column "countryId"?

    2 replies

    October 31, 2023

    you can do that in two ways:
    1. while fetching data from query, you can pass what ever fields you want in selection as below.

    2. prepare custom response as you need

    patriciam905
    October 31, 2023

    Thank you, this works