mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-07-19 22:30:13 +02:00
added util method to get property value from properties array
This commit is contained in:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user