<commit_before>#!/usr/bin/env node

var inquiry = require("../..");
require("proof")(2, function (equal) {
  var object;
  object = { firstName: "Abraham", lastName: "Lincoln" };
  equal(inquiry("[.{$.firstName == 'Abraham'}]")(object).pop().lastName, 'Lincoln', 'select by property');
  object = require('./presidents');
  equal(inquiry("/presidents[.{$.firstName == 'Abraham'}]")(object).pop().lastName, 'Lincoln', 'select by property');
});<commit_msg>Test that no dot is required in sub-queries.<commit_after>#!/usr/bin/env node

var inquiry = require("../..");
require("proof")(4, function (equal) {
  var object;
  object = { firstName: "Abraham", lastName: "Lincoln" };
  equal(inquiry("[.{$.firstName == 'Abraham'}]")(object).pop().lastName, 'Lincoln', 'select by property');
  equal(inquiry("[{$.firstName == 'Abraham'}]")(object).pop().lastName, 'Lincoln', 'select by property no dot');
  object = require('./presidents');
  equal(inquiry("/presidents[.{$.firstName == 'Abraham'}]")(object).pop().lastName, 'Lincoln', 'select by property many');
  equal(inquiry("/presidents[{$.firstName == 'Abraham'}]")(object).pop().lastName, 'Lincoln', 'select by property many no dot');
});
{'fraction_non_alphanumeric': 0.2398989898989899, 'fraction_numerical': 0.0016835016835016834, 'mean_word_length': 5.7942857142857145, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5253169', 'n_tokens_mistral': 394, 'n_tokens_neox': 392, 'n_words': 83}