added util method to get property value from properties array

This commit is contained in:
Sebastian Sdorra
2012-12-04 22:00:58 +01:00
parent 272fb1ea17
commit d60601b277

View File

@@ -178,4 +178,18 @@ if (!Array.prototype.filter) {
return results;
}
}
Sonia.util.getProperty = function(properties, key){
var value = null;
if ( properties != null ){
for (var i=0; i<properties.length; i++){
var property = properties[i];
if ( property.key == key ){
value = property.value;
break;
}
}
}
return value;
}