- Joined
- Oct 24, 2013
- Messages
- 47
- Reaction score
- 0
JavaScript:
const abcd = `[@parent.[#(?object=activity::criteria=typeid=76273 AND tbl_1770949.valuestr="1"::orderby=tbl_1770943.valuestr ASC){"userid":"$txtUserid$","organisations":"$rdOrganisations$","oversightGroupRole":"$cmbOversightRole$","oversightGroupMemberName":"$txtOversightPrefix$ $txtOversightFirstName$ $txtOversightSurname$","oversightGroupType":"$cmbOversightGroupType$"},#]@]`;
//Please note the statment
[@parent.[#(?object=activity::criteria=typeid=76273 AND tbl_1770949.valuestr="1":rderby=tbl_1770943.valuestr ASC){"userid":"$txtUserid$","organisations":"$rdOrganisations$","oversightGroupRole":"$cmbOversightRole$","oversightGroupMemberName":"$txtOversightPrefix$ $txtOversightFirstName$ $txtOversightSurname$","oversightGroupType":"$cmbOversightGroupType$"},#]@]
evaluates the string in the format below-e.g
JavaScript:
[{
"userid": "88664753",
"organisations": "Liverpool Heart and Chest Hospital NHS Foundation Trust*NIHR CRN Northwest Coast*University of Liverpool*",
"oversightGroupRole": "Member",
"oversightGroupMemberName": "Mr abcd",
"oversightGroupType": "Steering Committee"
}, {
"userid": "",
"organisations": "University of Liverpool*",
"oversightGroupRole": "Member",
"oversightGroupMemberName": "Professor ccc",
"oversightGroupType": "Steering Committee"
}, ]
My statement fails if any one the properties(userid,organisations etc) values contains backtik.
How can I fix that. How can I rectify an evaluated expression string that begins and ends with a backtick, while ensuring that the contents of the evaluated expression also contain backticks?