LokiDB icon indicating copy to clipboard operation
LokiDB copied to clipboard

Array support

Open Viatorus opened this issue 7 years ago • 0 comments

I'm submitting a...


[x] Feature request

Current behavior

Currently, the only options to query at array property level is $contains and $size.

See techfort/LokiJS/issues/447

Expected behavior

Introduce a new operator (like $array) which enables all other operations ($neq, $lt...) at each element of an array.

Minimal reproduction of the problem with instructions

coll.insert({ar: [1, 2, 3, 4]});

coll.find({
  $array: ["ar", {
    $lt: 2
  }]
});

What is the motivation/use case for changing the behavior?

More useful operator.

Viatorus avatar Apr 06 '18 06:04 Viatorus