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

Add $arrayElemAt helper

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: API
    • Labels:
      None

      Description

      Maybe

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

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: