You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hasOwnProperty does not behave as the same as keyword in, it doesn't check the inheritance of property and doesn't check if propety whichi is in prototype
I think this should only be supported by opt-in configuration. Inheritance may more often be used to enhance an object without intending those methods to be used as data.
Describe the bug
hasOwnProperty does not behave as the same as keyword in, it doesn't check the inheritance of property and doesn't check if propety whichi is in prototype
Code sample or steps to reproduce
// Code that reproduces problem here
function target() {
this.key1 = 1;
}
target.prototype.key2 = 2;
let obj = new target();
console.log(JSONPath({ path: '$.key1', json: obj }));
console.log(JSONPath({ path: '$.key2', json: obj }));
Console error or logs
[ 1 ]
[]
Expected behavior
[ 1 ]
[ 2 ]
Expected result
Environment (IMPORTANT)
7.0.0
Desktop**
Additional context
The text was updated successfully, but these errors were encountered: