Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
StefH committed Dec 5, 2024
1 parent c1226a8 commit e9862b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/WireMock.Net/Matchers/AbstractJsonPartialMatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ protected override bool IsMatch(JToken value, JToken? input)
case JTokenType.Object:
var nestedValues = value.ToObject<Dictionary<string, JToken>>();
return nestedValues?.Any() != true ||
nestedValues.All(pair => IsMatch(pair.Value, input.SelectToken(pair.Key)));
nestedValues.All(pair => IsMatch(pair.Value, input.SelectToken(pair.Key) ?? input[pair.Key])); // First try to select based on JPath expression, else just get the value.

case JTokenType.Array:
var valuesArray = value.ToObject<JToken[]>();
Expand Down

0 comments on commit e9862b3

Please sign in to comment.