Skip to content
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
@wtrocki

Description

@wtrocki

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions