I want to send the following JSON to the server:
{"active": "true"}
and I try to do it like this:
axios.patch('/api/musician/' + id, { key : val }).then(function (response) {
The variables key and val contain what I want:
console.log(key); // active
console.log(val); // true
However, what gets sent is:
{key: true}
I can't see why the value of variable "key" isn't used. Why is it not sending {"active": "true"} or {"active": true}?