Closed mattbishop closed 2 years ago
I'll look into this one first. Seems simple.
Reference examples of valid element accessor syntax:
$[1 to last] $[1, 3 to 5] $[1, 3 to 0.5 last] $[0, last-1 to last, 5] $[1, 3 to 0.5 last] $[1, 3 to 0.5 last - 1] $[1, 3 to (0.5 last) + 1]
wildcard accessor would be stand-alone, I think: [*]
More elaborate expressions might be allowed by Postgres, e.g. [last - ((7+1)*last/2)], but I question where those are of practical use.
The spec mentions wff and defines it as a well-formed formula, but doesn't define 'well-formed formula'.
Parser completed in #13. Thanks Jeff!
One can reference a range of elements in an array with the
to
keyword:$.myArray[0 to 5]
$.myArray[10 to last - 1]