julesfern / spahql

A query language for Javascript data. Extracted from Spah.
MIT License
325 stars 20 forks source link

Cannot select empty-string array element or change it with replace/set. #25

Open Bohtvaroh opened 10 years ago

Bohtvaroh commented 10 years ago

Go to the REPL and enter

[""]

as JSON data and execute this query: /0.

Actual result: undefined. Expected result: empty string.

Due to this issue it's impossible to change empty-string array element with replace or set.

trevorhreed commented 8 years ago

Also an issue with object properties:

In REPL, enter:

{
  "title": ""
}

as JSON data, and execute the following query:

/title

Actual result: undefined Expected result: ''