loopbackio / loopbackio/loopback-next
Rest filter is not working properly
Open
Nobody has claimed this yet.
bug
- Dominant language
- TypeScript
- Stars
- 5.1k
- Forks
- 1.1k
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 27
Description
Describe the bug
Query parameters sent by rest:

Parameters received by LoopBack:
{
"offset": 0,
"limit": 10,
"include": [
"images"
],
"where": {
"attributes": {
"or": [
{
"and": {
"[0][key]": "COLECCIÓN",
"[0][value]": "100% MARVEL",
"[1][key]": "MATERIA",
"[1][value]": "MARVEL"
}
}
]
}
}
}
Parameters expected by LoopBack:
{
"offset": 0,
"limit": 10,
"include": [
"images"
],
"where": {
"attributes": {
"or": [
{
"and": [
{ "key": "COLECCIÓN", "value": "100% MARVEL" },
{ "key": "MATERIA", "value": "MARVEL" }
]
}
]
}
}
}
Therefore the functionality described in the documentation does not work.
Logs
No response
Additional information
No response
Reproduction
N/A
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked LoopBack Where filter documentation and trace how REST query parameters become the shown where.attributes structure. Compare the received object with the expected array form, then verify the documented query against a reproducible REST request. Done means the request produces the expected filter structure and the documented functionality works.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100