I'm struggling with this issue 😞. My Client is performing an ajax httppost and I need to send the following data:
private doSaveQuery(queryName: string): void {
const info = {};
info['userName'] = 'admin';
info['userQueryName'] = queryName;
...
But when it gets stringified, it turns into this:
{"userName":"admin",
"userQueryName":{"queryName":"MyName"}
}
Why does it take my variable name "queryName" and add it as a key to my value?
How can I achieve this format instead?
{"userName":"admin",
"userQueryName":"MyName"
}
I believe this is a simple fix, so I appreciate your patience with my ignorance 😅.
Thanks in advance!