How to get top 3 or n elements from an array in a record

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Done
    • Priority: Blocker - P1
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      collection emp={
      _id,
      name,
      education:[{_id,school:a},{_id,school:b},{_id,school:c},{_id,school:d}]
      }

      Now how do one get the first two schools for an employee??
      MMTIA

            Assignee:
            Unassigned
            Reporter:
            Anurag
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: