com.ty.repairtech.JsonOperation.searchList = function(str, container) {
var newList = [];
var startChar = str.charAt(0);
var strLen = str.length;
for (var i = 0; i < container.length; i++) {
var obj = container[i];
var isMatch = false;
for (var p in obj) {
if ( typeof (obj[p]) == "function") {
obj[p]();
} else {
var curItem = "";
if(obj[p]!=null){
curItem = obj[p];
}
for (var j = 0; j < curItem.length; j++) {
if (curItem.charAt(j) == startChar)
{
if (curItem.substring(j).substring(0, strLen) == str)
{
isMatch = true;
break;
}
}
}
}
}
if (isMatch) {
newList.push(obj);
}
}
return newList;
}