Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-3294

Add $arrayElemAt helper

    XMLWordPrintableJSON

Details

    • Icon: New Feature New Feature
    • Resolution: Duplicate
    • Icon: Major - P3 Major - P3
    • None
    • None
    • API
    • None

    Description

      Maybe

      collection.aggregate(
            Arrays.asList(
                Aggregates.project(
                    Projections.fields(
                          Projections.computed(
                                  "firstCategory",
                                  Projections.arrayElemAt("$categories", 0)
                          )
                    )
                )
            )
      )

      Attachments

        Activity

          People

            Unassigned Unassigned
            hotdog929 hotdog929
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: