New language feature: Contains Stmt #37
marcauberer
started this conversation in
Ideas
Replies: 1 comment
-
Nice suggestion 👌 I originally thought of
which is closer to the JSON syntax, but you're right: your suggestion allows for more comparisons. So yeah, let's implement it ;) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Compose Generator needs a feature which can search in an input data array after an element, that contains attribute
<x>
to have value<y>
.I had the idea to introduce a new statement type. Here is an example for the suggestion:
service.frontend contains name == "spring-maven"
or
vars contains number >= 5
As you see, this would give us the possiblity to not only check if attribute
<x>
is equal to value<y>
, furthermore we can also check if an array contains any element with attribute<x>
, having a value not equal to<y>
. Or we could use more comparison operators like>
,<
,>=
,<=
.Beta Was this translation helpful? Give feedback.
All reactions