Filtering Out Properties in an ASP.NET Core API
问题 I want to serve up the following JSON in my API: { "id": 1 "name": "Muhammad Rehan Saeed", "phone": "123456789", "address": { "address": "Main Street", "postCode": "AB1 2CD" } } I want to give the client the ability to filter out properties they are not interested in. So that the following URL returns a subset of the JSON: `/api/contact/1?include=name,address.postcode { "name": "Muhammad Rehan Saeed", "address": { "postCode": "AB1 2CD" } } What is the best way to implement this feature in ASP