groq-js
groq-js copied to clipboard
Filter on a non-array should return the base value.
const query = "false[true]";
const tree = parse(query);
const result = await (await evaluate(tree)).get();
console.log(result);
// Should be false, is null
According to the GROQ spec's section on Filter, if the base is not an array, the base should be returned. In this case, it's returning a null
, which isn't correct.