1 function Sys$Services$_ProfileService$_unflattenProperties(properties) {
2 var unflattenedProperties = {};
3 var dotIndex;
4 var val;
5 var count = 0;
6 for (var key in properties) {
7 count++;
8 val = properties[key];
9 dotIndex = key.indexOf('.');
10 if (dotIndex !== -1) {
11 var groupName = key.substr(0, dotIndex);
12 key = key.substr(dotIndex+1);
13 var group = unflattenedProperties[groupName];
14 if (!group || !Sys.Services.ProfileGroup.isInstanceOfType(group)) {
15 group = new Sys.Services.ProfileGroup();
16 unflattenedProperties[groupName] = group;
17 }
18 group[key] = val;
19 }
20 else {
21 unflattenedProperties[key] = val;
22 }
23 }
24 properties.length = count;
25 return unflattenedProperties;
26 }