You are not logged in.
TDocVariantData. FlattenFromNestedObjects whether can increase the transformation as follows:
{“arr":["a","b","c”]} => {"arr.1":"a","arr.2":"b","arr.3":"c"}
Offline
Why not?
But I have started numbering the array items at 0, for consistency:
https://github.com/synopse/mORMot2/commit/7c6bab21fa31b
Online
Thank you for your quick response, very great project.
Some apis (aliyun openapi) need to flatten the submitted object if it requires formdata, but it handles arrays with the sequence number of the first element being 1.
Is it possible to define a HandleArrayType=(hatNone=-1,hatZero=0,hatOne=1);
Change the array type of aHandleNestedArray to this HandleArrayType to determine the element sequence number based on the type
Offline
Good idea.
Please try
https://github.com/synopse/mORMot2/commit/1d2b154a2
Online
perfect!Thank you for your work.
Offline