Uploaded image for project: 'MongoDB Shell'
  1. MongoDB Shell
  2. MONGOSH-1037

Numeric field are sorted to the front (js shell)

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • No version
    • Affects Version/s: None
    • Component/s: Embedded Shell
    • Labels:
      None
    • Not Needed

      In javascript in the shell fields are being reorder, with numeric ones first:

      > x = {a:1, 10:1}
      {"10":1, "a":1}
      

      This becomes a problem when I create a compound index with a numeric attribute name like 10 since the index is not created as expected.

            Assignee:
            Unassigned Unassigned
            Reporter:
            sherry.ger@10gen.com Sherry Ger
            Votes:
            0 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved: