diff --git a/accurest-core/src/main/groovy/io/codearte/accurest/util/JsonPathEntry.groovy b/accurest-core/src/main/groovy/io/codearte/accurest/util/JsonPathEntry.groovy index 0e0f928f22..be1638027e 100644 --- a/accurest-core/src/main/groovy/io/codearte/accurest/util/JsonPathEntry.groovy +++ b/accurest-core/src/main/groovy/io/codearte/accurest/util/JsonPathEntry.groovy @@ -17,8 +17,7 @@ class JsonPathEntry { if (optionalSuffix) { return ["!${parsedJsonVariable}.read('''${jsonPath}''', JSONArray).empty"] } else if (traversesOverCollections()) { - return ["${parsedJsonVariable}.read('''${jsonPath}''', JSONArray).size() == 1", - "${parsedJsonVariable}.read('''${jsonPath}''', JSONArray).get(0) ${operator()} ${potentiallyWrappedWithQuotesValue()}"] + return ["${parsedJsonVariable}.read('''${jsonPath}''', JSONArray).get(0) ${operator()} ${potentiallyWrappedWithQuotesValue()}"] } return ["${parsedJsonVariable}.read('''${jsonPath}''') ${operator()} ${potentiallyWrappedWithQuotesValue()}"] }