jsonpath
jsonpath copied to clipboard
Testing if a path matches a given JSONPath
For example:
expect(jsonpath.isMatch('$.given[*].first', '$.given[2].first')).to.be.true;
expect(jsonpath.isMatch('$.given[*].first', '$.given[0].second')).to.be.false;
Meaning I am trying to know if a specific "instance" of a path, matches the given JSONPath.
I am trying to do the same thing. I have a path & I want to figure out if it matches based on JSON path.