Hi,
I migrate data from a source to CockpitCMS. The import and mapping function in Cockpit is really nice, but unfortunately the collection-entry-properties _created and _modified can not be mapped with properties from the imported json
So I decided to have a additional field in my collection: “date”. Users should handle this as optional, but the imported json datas “date” I will map to the new field.
I want the API request now to sort the results by two parameters: the new date field and _created.
If i write it in this way:
sort: {date: -1, _created: -1},
the response gives me first the entries which have a “date” field filled and then the left _created ones… But I want to mix the results.
“Sort by date and if there is now date setted sort by _created”
or is there a way to map _created and _modified while importing json?