@@ -0,0 +1,846 @@
+/**%0A * %0A */%0Apackage com.kcthota.JSONQuery.expressions;%0A%0Aimport com.fasterxml.jackson.databind.JsonNode;%0Aimport com.fasterxml.jackson.databind.node.IntNode;%0A%0A/**%0A * @author Krishna Chaitanya Thota%0A * Apr 29, 2015 11:14:38 PM%0A */%0Apublic class IndexofValueExpression extends IntegerValueExpression %7B%0A%0A%09private String str;%0A%09public IndexofValueExpression(String property, String str) %7B%0A%09%09super(property);%0A%09%09this.str=str;%0A%09%7D%0A%0A%09public IndexofValueExpression(String property, String str, ValueExpression innerExpression) %7B%0A%09%09super(property, innerExpression);%0A%09%09this.str=str;%0A%09%7D%0A%0A%09@Override%0A%09public JsonNode evaluate(JsonNode node) %7B%0A%09%09JsonNode valueNode = super.evaluate(node);%0A%09%09if(this.str!=null && valueNode!=null && valueNode.isTextual()) %7B%0A%09%09%09return IntNode.valueOf(valueNode.textValue().indexOf(str));%0A%09%09%7D %0A%0A%09%09return IntNode.valueOf(-1);%0A%09%7D%0A%09%0A%09%0A%0A%7D%0A

add indexofexpression