question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[question] How to implement ?fields=name,email filter?

See original GitHub issue

Hello everyone and thanks for this great bundle!

I’m currently trying to find a way to limit the returned fields on a GET request dynamically by using a fields list on the query string.

Standard: GET /books

[
  {
    "id": 19,
    "isbn": null,
    "title": "test",
    "description": "test",
    "author": "test",
    "publicationDate": "2016-11-28T14:47:44+00:00",
  },
  {
    "id": 25,
    "isbn": "9788811810148",
    "title": "Odissea",
    "description": "Grande classico ellenico",
    "author": "Omero",
    "publicationDate": "2016-11-11T18:14:58+00:00",
  }
]

With filter: GET /books?fields=id,title

[
  {
    "id": 19,
    "title": "test",
  },
  {
    "id": 25,
    "title": "Odissea",
  }
]

What would be the recommended way to solve this?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
teohhanhuicommented, Feb 16, 2017

symfony/symfony#18834 has been merged. 🎉

0reactions
Simperfitcommented, Jun 27, 2017

This has been implemented in core !

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to add a filter in <sn-record-picker></sn-reco...
Hi all, I have one use case where I want to show the users by using sn-record-picker based on one of the values...
Read more >
How to Filter and Compare Results (Segmenting and Cross ...
Filter or compare survey data and email metrics based on default fields or custom fields you create for contacts. Default fields: Name, Email, ......
Read more >
How to filter the form in django template - Stack Overflow
The form has those fields: name, email, phone, company, subject, and message. The templates code is as follows. Question: If I do not...
Read more >
Filtering recipients by custom field — Sendy Forum
Custom field filtering is super important and would be amazing. ... Question is: do you really need segmentation, or just your clients?
Read more >
SugarCRM API CheatSheet - Seven Tunes Labs
To filter by relationships, you can use the relationship_name.field syntax here. Eg: Contacts module has a relationship with emails named ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found