When I try to use a code like this:
jQuery.post("http://mywebsite.com/", {
array-key: "hello"
});
I get this error:
Uncaught SyntaxError: Unexpected token -
I tried surrounding the key in quotation marks, but nothing happened. I'd like to know if it's because of some other mistake I am making at the other website or because that's not how to include a dash in an object's key. And if it's not I'd like to know how to do it. Thanks in advance.