谁能使用Strapi V4说明如何执行$和过滤器REST API查询?我是Strapi的新手。谢谢

发布于 2025-02-11 14:53:47 字数 130 浏览 3 评论 0原文

谁能使用Strapi V4说明如何执行$和过滤器REST API查询?我是Strapi的新手,并遵循了文档的指导,但这不起作用。多谢!

我想做的事情的一个例子:

检索一份参与数学和物理学的学生列表。感谢提供的任何帮助!

Can anyone please explain how to perform the $and filter rest api query with strapi v4? I am new to strapi and followed the guidance in the documentation but this does not work. Thanks alot!

An example of what I am trying to do:

Retrieve a list of students who are enrolled in both Maths and Physics. I appreciate any help that is offered!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

眉黛浅 2025-02-18 14:53:47
api/students?filters[$and][0][classes][subject][$eq]=Maths&filters[$and][1][classes][subject][$eq]=Physics

您可以尝试一下,假设有1个学生有n个课程,那么课堂上有主题字段

api/students?filters[$and][0][classes][subject][$eq]=Maths&filters[$and][1][classes][subject][$eq]=Physics

You may try this one, assuming 1 student has N classes, which there is subject field in class

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文