JSONPath-Plus / JSONPath

A fork of JSONPath from http://goessner.net/articles/JsonPath/
Other
963 stars 169 forks source link

ResultType "parentProperty" always results in ResultType of "value" #119

Closed pyoor closed 4 years ago

pyoor commented 4 years ago

When setting the resultType to "parentProperty", the result will throw due to the resultType.toLowercase() and then this switch statement:

https://github.com/s3u/JSONPath/blob/c630cd1ebdcf67740b3ec80dd6af8053058154c6/src/jsonpath.js#L347-L365

Furthermore, even if the case statement is set to lowercase ("parentproperty"), the result will fail due to the object property casing (i.e. "parentProperty").

brettz9 commented 4 years ago

Fixed now in v4.0.0. Thanks for the report!