i need a valid JSON format to request ES. i have a string like
{
time: {
from:now-60d,
mode:quick,
to:now }
}
but when i try to use JSON.parse
i got error because my string should be like
{
time: {
"from":"now-60d",
"mode":"quick",
"to":"now" }
}
so my question, there is any solution to add double quotes around keys and values of my string ?
thanx
See Question&Answers more detail:os