Rename keys in json

Feature(s) impacted

keys in json schema

Observed behavior

keys cannot be renamed.

My Mongoose schema :

...,
legalRepresentative: {
        firstName: String,
        lastName: String,
        telephone: String,
        email: String,
        isSignatory: Boolean,
},
...

Expected behavior

I would like to rename FirstName, LastName, etc. in french (but not the keys in Mongoose Model).

Context

  • Project name: lereacteur-admin

Hello @XavierColombel ,

In order to be able to rename json keys, you need to flatten the “legalRepresentative” field.
You can find some documentation about it here: https://docs.forestadmin.com/documentation/extra-help/setup/flatten-nested-fields-mongodb

Kind regards,
Enki