我想知道是否可以通过 API 或 graphQL 从嵌套对象中删除项目。我有一个集合类型(餐厅),内部有一个可重复的组件,称为“特许经营”(佛罗里达和纽约)。我只想删除其中之一(例如佛罗里达州)。那可能吗?
API获取
{
"data": [{
"id": 2,
"attributes": {
"name": "Italian Food",
"address": null,
"createdAt": "2023-09-16T19:13:50.831Z",
"updatedAt": "2023-09-16T19:13:51.632Z",
"publishedAt": "2023-09-16T19:13:51.629Z",
"franchise": [{
"id": 4,
"state": "Florida"
}, {
"id": 5,
"state": "New York"
}]
}
}],
"meta": {
"pagination": {
"page": 1,
"pageSize": 25,
"pageCount": 1,
"total": 1
}
}
}