Honestly, I don't fully understand this issue. The way the code was written, it should already support both field keys and values containing spaces. But during testing, I noticed something weird. The example Smart Node I made for testing used the following search:
"travel by":car
According to a console log, fieldQuery contained the object: {"travel by": "car"}
During the for (const f in fieldQuery) loop, f is a string that contained escaped quotes. (example: "\"travel by\""). The keys in fields didn't. I'm not sure why that's happening, but this change fixes it.
I'll put this out for review, but I'll continue investigating to better understand what's going on.
Closes #277
Honestly, I don't fully understand this issue. The way the code was written, it should already support both field keys and values containing spaces. But during testing, I noticed something weird. The example Smart Node I made for testing used the following search:
"travel by":car
According to a console log,
fieldQuery
contained the object:{"travel by": "car"}
During the
for (const f in fieldQuery)
loop,f
is a string that contained escaped quotes. (example:"\"travel by\""
). The keys infields
didn't. I'm not sure why that's happening, but this change fixes it.I'll put this out for review, but I'll continue investigating to better understand what's going on.