0

We have one of our development database displaying a number field in the form:

"height": {
   "$numberInt": "72"
},

instead of the expected form:

"height": 72,

We see this both from the mongo CLI and from a NodeJS application which is connecting to the DB.

The mongodb version is v4.0.12, running on an Ubuntu 16.4 host. We are wondering whether this was a side effect of a database upgrade?

Can anyone suggest how to fix the data to be of the expected form and what may be the source of the issue?

put on hold as unclear what you're asking by Philᵀᴹ, mustaccio, Marcello Miorelli, John Eisbrener, Marco Nov 14 at 7:44

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    Looks like normal MongoDB Extended JSON – mustaccio Nov 6 at 20:09
  • Odd that this doesn't happen with our other DBs? Is there a way to flatten the results to expected form? – Andre M Nov 6 at 22:01
  • 2
    That is up to your client software I presume. – mustaccio Nov 6 at 23:34

Browse other questions tagged or ask your own question.