【发布时间】:2021-01-08 17:17:40
【问题描述】:
我有以下结构(swagger 文件):
{
"swagger":"2.0",
...
"paths": {
"/pet": {
"post" : { ... }
"put" : { ... }
},
"/anotherpetstore": {
"post" : { ... }
"put" : { ... }
}
}
}
我现在想要 {'paths': {'$regex':'pet'}} 并找到两条路径。
这在 MongoDB 中是否可行?
我发现了一些类似的问题,它们从未寻找对象本身的名称。
MongoDB Search nested Objects without knowing Key
How to find specific nested objects without knowing the parent key in mongodb
【问题讨论】: