Is there a way to use jsonpath in mongodb 3.4/3.6? Sample is shown below , as in reference link JSON path parent object, or equivalent MongoDB query :
var t1 = db.runCommand({aggregate : 'news_feeds',
pipeline:[],
cursor : {batchSize : 10}});
t1.cursor.firstBatch.forEach(function(doc)
{
var json = tojson(doc);
var json1="$.feeds.reviews[*].name"
var result = jsonPath(json, json1);
print(result);
})
This query gives an error that jsonPath is not defined, but this jsonpath is there in the javascript
Please help
regards
kris