Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

Added possibility to return last item in JsonPathFilter

Michael Rademaker5508c5da0a95
diff --git a/model/src/main/java/org/openremote/model/value/JsonPathFilter.java b/model/src/main/java/org/openremote/model/value/JsonPathFilter.java
index bf2888a30..49652c010 100644
--- a/model/src/main/java/org/openremote/model/value/JsonPathFilter.java
+++ b/model/src/main/java/org/openremote/model/value/JsonPathFilter.java
@@ -36,11 +36,16 @@ public class JsonPathFilter extends ValueFilter<Value> {
@JsonProperty
public boolean returnFirst;
+ @JsonProperty
+ public boolean returnLast;
+
@JsonCreator
public JsonPathFilter(@JsonProperty("path") String path,
- @JsonProperty("returnFirst") boolean returnFirst) {
+ @JsonProperty("returnFirst") boolean returnFirst,
+ @JsonProperty("returnLast") boolean returnLast) {
this.path = path;
this.returnFirst = returnFirst;
+ this.returnLast = returnLast;
}
@Override