Fix '#' substitution in array values

Adds special handling of commas in the query parser, as they may appear both as an object property delimiter and an array member delimiter.

When encountering a comma, we check in the preceding characters what comes first : `'{'` (an object property) or `'['` (an array value)