String "ends with" comparison issue: left operand being 1 character less than right operand
Closed this issue · 2 comments
mateuadsuara commented
On v3.10.3
, a predicate containing an "ends with" operator ($=
or $==
) will return true
when the left operand is one character less than the right operand, even if they don't match.
For example:
var doc = {
"books" : [
{
"title" : "Javascrip"
}
]
}
var wat = JSPath.apply('.books{.title $== "Javascript"}', doc)
expect(wat).toEqual([])
dfilatov commented
@mateuadsuara JSPath doesn't have v3.10.3
, current version is 0.3.4
and this bug was fixed in it.
mateuadsuara commented
Sorry, I was using 0.3.3
(I confused how to get the version number).
Great! thanks for the quick response :)