This repository was archived by the owner on Apr 17, 2023. It is now read-only.
This repository was archived by the owner on Apr 17, 2023. It is now read-only.
Allow to provide custom data mapping. #25
Open
Description
Sync currently in most of the times returns specific format of dataset:
{
uid: "myid",
data: {name:"mydata"}
}
This format is not flexible and in most of the cases it will be better to integrate id into actual data.
Most of the sync implementations doing that anyway.
Example code for formatter:
_.values(syncResponse).map((syncData: any) => {
// Change format of the data by mapping id's
syncData.data.uid = syncData.uid
// Only interested in the actual data from the sync response
return syncData.data;
});
Metadata
Metadata
Assignees
Labels
No labels