I have an object in JavaScript with keys as selectors:
{
"[data-index="0"]": {
// something
},
"> .class > .one": {
key: "very bad+ \"\' string"
}
}
Is there a way to send this object via AJAX without altering the keys and ensuring the values are correctly formatted?
In terms of correct formatting, I mean that the "very bad+ \"' string" needs to be fully escaped while preserving all characters and symbols for storage in a database.
PS. I am aware of how to send objects via AJAX.