We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9998423 commit 4ac2967Copy full SHA for 4ac2967
adminforth/dataConnectors/mongo.ts
@@ -213,6 +213,17 @@ class MongoConnector extends AdminForthBaseConnector implements IAdminForthDataS
213
return null;
214
}
215
return value?.toString();
216
+ } else if (field.type == AdminForthDataTypes.JSON) {
217
+ if (JSON.stringify(value).includes('$numberDecimal')) {
218
+ const json = JSON.stringify(value, (key, value) => {
219
+ if (value && typeof value === 'object' && '$numberDecimal' in value) {
220
+ return value.$numberDecimal;
221
+ }
222
+ return value;
223
+ });
224
+ return JSON.parse(json);
225
226
227
228
229
return value;
0 commit comments