我正在尝试使用wordpress提供的\\u fields param访问某些深度嵌套的字段。我的问题是什么?
响应结构。
{
"_embedded" : {
wp:featuredmedia : [
{
"id": 21917,
"date": "2021-02-27T11:56:48",
"slug": "SLUG",
"type": "attachment",
"link": "https://SITENAME.net/POST/POST/",
"title": {
rendered": "SLUG NAME"
},
}
]
}
}
期望响应:
{
"_embedded" : {
wp:featuredmedia : [
{
"link": "https://SITENAME.net/POST/POST/",
}
]
}
}
我尝试使用的查询:
http://yoursite.com/wp-json/wp/v2/posts?_embed&_filter=_embedded.wp:featuredmedia[0].link