Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
fix Bson.opEquals: order of object keys is not determined #2183
The spec is pretty clear on that:
Implementation Defined: The built-in associative arrays do not preserve the order of the keys inserted into the array. In particular, in a foreach loop the order in which the elements are iterated is typically unspecified.
Of course, it might make sense for Bson to have a defined order, but you can't rely on built-in arrays for this.