I have tried jsonata exerciser. It looks cool.
But I have to implement it in my code(NodeJS).
Let's say
Input is:
{
"id": "course_uuid1",
"description": "Sample course description",
"contentType": "COURSE",
"category": "Course",
"durationInSeconds": 500,
"expertiseLevels": ["INTERMEDIATE"],
"imageUrl": "https://percipio.com/courseuuid1/imagelink",
"link": "https://percipio.com/courseuuid1",
"modalities": ["LISTEN", "READ", "WATCH"],
"languageCode": "en",
"parent": null,
"publishDate": "2018-11-19T10:23:34Z",
"sourceName": null,
"technologyTitle": null,
"technologyVersion": null,
"title": "Java",
"by": ["admin"]
}
Transformation logic is:
{
"pkID": id,
"description": description,
"componentTypeID": contentType,
"totalLength": durationInSeconds,
"thumbnailURI": imageUrl,
"locale": languageCode,
"createTimestamp": publishDate,
"title": title,
"lastUpdateUser": by
}
I want output in the transformation logic format, but through NODEJS code.
Please suggest