Karate: How to convert a Number to a String in a list

I am getting a map/list from the DB by doing:

myDBList = db2.readRow()

I am trying to compare that list with a nested json object I get from the response doing:

* match $myDBList[*].someValues contains only /myResponse/someValues 

My problem is sometimes some of the values in myDBList are Numbers and values in the response are String. I am getting this error:

$ | actual does not contain expected | actual array does not contain expected item - 123 (LIST:STRING)
$[0] | data types don't match (NUMBER:STRING)

I have tried to convert the object in my list with no success doing:

  • def newList = myDBList.map(x => x + ”)