Ask Your Question
3

In JSON SERVER, what is the method to apply a filter that retrieves only the array elements beginning with the letters indicated in the filter?

asked 2023-05-28 13:00:12 +0000

qstack gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2023-05-28 13:14:01 +0000

ladyg gravatar image

The method to apply a filter that retrieves only the array elements beginning with the letters indicated in the filter is to use the query parameter _start. For example, if you have an endpoint /users with an array of user objects, and you want to retrieve only the users whose name starts with "J", you can make a GET request to the endpoint /users?name_like=J. This will return all the users in the array whose name starts with the letter "J".

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-05-28 13:00:12 +0000

Seen: 8 times

Last updated: May 28 '23