Returns the intersection of cPath1
and cPath2
.
Returns the intersection of cPath1
and cPath2
. If there are no
CPathArray
components in the 2 paths, then the intersection is non-empty
iff cPath1 === cPath2
. However, if cPath1
and/or cPath2
contain some
CPathArray
components, then they intersect if we can replace some of the
CPathArray
s with CPathIndex(i)
and have them be equal. This is CPath
is their intersection.
For instance, intersect(CPath("a.b[*].c[0]"), CPath(CPath("a.b[3].c[*]")) === CPath("a.b[3].c[0]")
.