Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • Perhaps share your aggregate query to the question, so we can try to reproduce and detect the root cause. Commented Jun 11, 2022 at 7:34
  • @YongShun i added the error statement. my members list is in the wrong place in groupRoles. it not mapped with role id. Commented Jun 11, 2022 at 8:05
  • Demo. The output data look the same as your expected data. Can you further explain what the "list of members is not in the correct index of groupRoles" mean? Is it order by sequence based on the id in original groupRoles.members? Commented Jun 11, 2022 at 8:32
  • @YongShun Oh sorry, I omitted the value when I wrote the question, I edited the data in the question. Member list of result not mapped with role id. Commented Jun 11, 2022 at 9:01
  • Demo in my correct result user :"629e1bb117366c39bc7d78e1" is member of role "6298503f8a31000024002107". but query return user "629e1bb117366c39bc7d78e1" is member of role "629850128a31000024002102". Commented Jun 11, 2022 at 9:08