Skip to content

Instantly share code, notes, and snippets.

@benui-dev
Created June 7, 2010 01:05
Show Gist options
  • Save benui-dev/428087 to your computer and use it in GitHub Desktop.
Save benui-dev/428087 to your computer and use it in GitHub Desktop.
my $cursor = $collection->find(
{ run_mode => 'production' },
{ sort_by => { start_time => 1 } },
)->fields( { system_id => 1, main_stage => { duration => 1 } } );
# Returns everything under "main_stage", not just "duration".
# Is it possible to do nested field spec like this?
@benui-dev
Copy link
Author

Solution was:
"main_stage.duration" => 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment