Skip to content

v6.3.0

Compare
Choose a tag to compare
@krisk krisk released this 23 Jun 04:55

Features

  • provide alternative array notation for nested paths (7077fbe), closes #432

    const options = {
      // equivalent to `keys: [['author', 'firstName'], ['author', 'lastName']]`
      keys: ['author.firstName', 'author.lastName']
    }

    And with logical query expressions, the following are equivalent:

    // Example 1
    {
      $and: [{ 'author.firstName': 'jon' }, { 'author.firstName': 'scazi' }]
    }
    
    // Example 2
    {
      $and: [
        {
          $path: ['author', 'firstNname'],
          $val: 'jon'
        },
        {
          $path: ['author', 'lastName'],
          $val: 'scazi'
        }
      ]
    }