'How to search in a specific field with REST API
I created a fake REST API. My user object like the following:
users:[
{
id:1,
firstName: "Terry",
lastName: "Max",
...
}
]
I want to query only the users which have the firstName included Tr characters.
When I search with this, it searches inside of every properties like firstName, lastName etc.
http://localhost:3000/users?q=Tr
How can I search this text only in firstName property?
By the way where can I find a full documentation of REST API? When I search it on google, I found someone else's APIs.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
