Thanks Jan for your comments I think the issue was with this cat command which ignores the character '$' while creating files. So I used '\' as a escape character for saving it and it worked perfectly.
cat <<EOF >/var/jsreport/data/testTemplate/config.json
{
"shortid": "Skg6lyHasL",
"name": "testTemplate",
"recipe": "text",
"engine": "jsrender",
"chrome": {
"printBackground": true
},
"creationDate": "2020-05-28T13:39:17.492Z",
"modificationDate": {
"\$\$date": 1590673209303
},
"_id": "0Kog3miLXUG9Qwsx",
"\$entitySet": "templates"
}
EOF