我正在为应用程序使用json-server。数据结构如下:
persons:[
{
firstName: 'John',
lastName: 'Black',
},
{
firstName: 'Stephen',
lastName: 'John',
},
{
greeting: 'Jim',
name: 'Lee',
}
]
有一种方法可以获取所有具有firstName ='John'或lastName ='John'的人?
类似http://localhost:4000/persons?[firstName_like,lastName_like]=John
可能会返回:
[
{
firstName: 'John',
lastName: 'Black',
},
{
firstName: 'Stephen',
lastName: 'John',
}
]