void LoadSections (JsonArray array, object data)
{
if (array == null)
return;
int n = array.Count;
for (int i = 0; i < n; i++){
var jsonSection = array [i];
var header = GetString (jsonSection, "header");
var footer = GetString (jsonSection, "footer");
var id = GetString (jsonSection, "id");
var section = new Section (header, footer);
if (jsonSection.ContainsKey ("elements"))
LoadSectionElements (section, jsonSection ["elements"] as JsonArray, data);
Add (section);
if (id != null)
AddMapping (id, section);
}
}