$graphLookup - is it possible to get the result in a nested document?

I have a tree structure and would like to perform a $graphLookup in some node, and get the nodes N levels down… But instead of getting the result in a list or array, I would like to get a nested document. Is it possible to do this, some how?

@jcotero

This is not directly related to the Lectures or Labs in this course and so is not suitable as a post in this Forum. I would suggest that you post this on StackOverflow or one of the MongoDB general discussion forums.

Thanks for your answer. So I guess your reply already answered part of my question: there isn’t really an easy and simple way of doing this in the current version of MongoDB, it seems.

I confess that this use case was the main motivation for me to subscribe to this course.

Maybe you guys would consider including this use case as an option for future versions of MongoDB (just a suggestion)?

1 Like

@jcotero

If you have a suggestion, I would strongly recommend using the “Report an issue” tab at the bottom of the screen to make that directly to the curriculum team. They don’t usually read the Forum posts, so that’s the best way to get this to them.

1 Like