I'm trying to send this data to an API:
data={
"to":{name : "to whom"}
};
But JavaScript doesn't allow me to do so (note that "name" is a variable). On the other hand it allows me to do as following:
data={
"to" :{"me": "to whom"}
};
What am I doing wrong ?