Is it possible to exclude certain fields from being included in the json string?
Here is some pseudo code
var x = {
x:0,
y:0,
divID:\"xyz
Here's another approach, although without Internet Explorer support.
const privateProperties = ["privateProperty1", "privateProperty2"];
const excludePrivateProperties = (key, value) => privateProperties.includes(key) ? undefined : value;
const jsonString = JSON.stringify(x, excludePrivateProperties);