Uploaded image for project: 'Realm JavaScript SDK'
  1. Realm JavaScript SDK
  2. RJS-1896

user.customData is not returning data in proper JSON format

      How frequently does the bug occur?

      All the time

      Description

      After login user.customData should return the data in proper json formats.

      But receiving the data in E-JSON format.
      See stats property:

      {
          "_id": "62efedca3587e6e83c0fc675",
          "lastName": "",
          "firstName": "Ahmad",
          "email": "ahmedmukhtar1133@gmail.com",
          "password": "",
          "company": "",
          "optNewsLetter": true,
          "id": "62f013361798f5d543a7fa52",
          "verified": true,
          "acceptedTermsDate": "08/08/2022, 00:30:22",
          "acStatus": null,
          "acId": null,
          "managedUsers": [],
          "stats": {
              "appStartCount": {
                  "$numberInt": "13"
              },
              "batchRunExportCount": {
                  "$numberInt": "1"
              },
              "testRunCount": {
                  "success": {
                      "$numberInt": "12"
                  },
                  "failed": {
                      "$numberInt": "2"
                  }
              }
          }
      }
      

      Expected:
      It should return data in proper json or should provide toArray() method like mongodb-nodejs package provides

      Stacktrace & log output

      No response

      Can you reproduce the bug?

      Yes, always

      Reproduction Steps

      const credentials = Realm.Credentials.emailPassword(params.email, params.password)
      const user = await app.logIn(credentials)
      console.log(user.customData)
      

      Version

      1.7.1

      What SDK flavour are you using?

      Atlas App Services (auth, functions, etc.)

      Are you using encryption?

      No, not using encryption

      Platform OS and version(s)

      MacOs

      Build environment

      Electron: ReactJS, NodeJs

      Cocoapods version

      No response

            Assignee:
            Unassigned Unassigned
            Reporter:
            unitosyncbot Unito Sync Bot
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: