Encountering a recurring JSON error where the user input from a textbox is being passed in JSON for assigning class level permissions in a parse server.
var cc = "role:" + user;
var jsonParam = "{ 'classLevelPermissions' :
{ 'get':
{ '*': true, '" + cc + "' : true },
'find':
{'*': true,'" + cc + "' : true },
'create':
{ '" + cc + "' : true },
'update':
{ '" + cc + "' : true },
'delete':
{ '" + cc + "' : true }
}
}";
const result = this.http.post(this.url,
{
"reqparam": JSON.parse(jsonParam)
}, httpOptions).toPromise();
console.log(result);
Seeking assistance to resolve this issue.