从下面的json我想根据用户请求参数检索国家,类别等的数据。我该怎么做? 下面的代码片段我用于mongo存储库
@Query(value = "{ 'offeringInfo.offeringId' : ?0}", fields = "{'fields':1}")
Offering findOfferingByFields(String offeringId, String fields);
{
"_id" : "PMRS774616-PICSD215",
"offeringInfo" : {
"service" : "HBOGO",
"mindOfferingId" : "PMRS774616",
"offeringType" : "FEATURE",
"offeringId" : "PMRS774616-PICSD215"
},
"categories" : [ "Late Night Movies" ],
"country" : {
"name" : "US",
"isoCode" : "840",
"startDate" : "2015-09-09T06:00:00.000-04:00",
"endDate" : "2016-12-31T00:00:00.000-05:00"
},
"photos" : [ ]
}