Instantly share code, notes, and snippets.

Embed
What would you like to do?
MONGO UNWIND EXAMPLE
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