Created
May 10, 2016 16:23
-
-
Save alexhogak/b2f4f0e5d19ca3c6b81a4c39378acc7d to your computer and use it in GitHub Desktop.
MONGO UNWIND EXAMPLE
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
db.newwolverhampton.aggregate([{$unwind: "$Appeals"},{$project: {_id: 0, BAReference: 1, Postcode: 1, EffectDate: 1, TotalArea: 1, BillingAuthority: 1, RateableValue: 1, Address: 1, Description: 1, Appeal_Reference: "$Appeals.ReferenceNo", Appeal_Applicant: "$Appeals.Applicant", Appeal_Agent: "$Appeals.Agent", Grounds: "$Appeals.Grounds_for_Appeal", Appeal_Start: "$Appeals.Start_Date", Appeal_End: "$Appeals.End_Date", Appeal_Settlement: "$Appeals.Settlement"}},{$out: "newwolvesappeals"}]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment