Is there a substring method for basic JSON Path expressions in SOAPUI?
<p>You've been big help in the past, so I'm hoping you can help me with this. So currently I'm working on a project at work using soapui to get back a giant Json payload. I need to create some assertions, and some of these will need to look at multiple nodes that have only one thing in common. That one thing is the first part of one of the nodes.</p>

<p>So what I'm looking for is some kind of substring command for JSONPath. Here is an example of what I'm looking for.</p>

<pre><code>"BurgerJoints":    [
           {
         "JointName": "Bob's Burgers",
         "Price": 5
         },
        {
         "JointName": "Bob's Broiler Stand",
         "Price": 5
         },
         {
          "JointName": "Burger King",
          "Price": 5
         },
         {
           "JointName": "Bob's Beef Haven",
           "Price": 5
         },
         {
           "JointName": "Super Weenie Hut",
           "Price": 5
         }
 ]
</code></pre>

<p>In my example let's say I'm looking for all joints that are Bob's something. So my initial thought was to do something like 
       BurgerJoints[?(@.Substring(JointName,0,3)=="Bob")]
, to give me the nodes. But it looks like it didn't work. Can anyone tell me where my syntax went wrong, or if there isn't a way to do it in that way, what the best to accomplish my goal is?</p>

<p>Thanks guys!!</p>

<p>EDIT:</p>

<p>So I tried using Groovyscript to do it and I think I've gotten close, but somewhere the lists aren't populating. Here is the code I'm using</p>

<pre><code>//imports
import groovy.json.JsonSlurper

//grab the response
def ResponseMessage = messageExchange.response.responseContent
//define a JsonSlurper
def jsonSlurper = new JsonSlurper().parseText(ResponseMessage)

//verify the slurper isn't empty
assert !(jsonSlurper.isEmpty())

def jsonlist =[]

def i = 0

while (jsonSlurper.BurgerJoints[i] != null)
{
if(jsonSlurper.BurgerJoints[i].JointName.toString().substring(0,3)=="Bob")
    {
        jsonlist.add(jsonSlurper.BurgerJoints[i])

    }

    i++
}


def jsonlist2 = new JsonSlurper().parseText(jsonlist.toListString())

assert jsonlist2.size()==3
</code></pre>

<p>Still not working unfortunately.</p>