Print Property Set

Let's take a minitue to prettify the result. We can implement this simple function:

function printPropertySet(entites, myPropertySet) {
    for (var entitiy in entites) {
        for (var propertySet in entites[entitiy].properties) {
            if (propertySet === myPropertySet) {
                console.log(entites[entitiy].properties[pset]);
            }
        }
    }
}

Calling this function will give us a prittier result:

{
  TypeMark: "_TYPE-MARK_",
  Keynote: "_KEYNOTE_",
  StoreyName: "Level: Level 1",
  TypeDescription: "_DESCRIPTION_",
  StatusConstruction: "New Construction",
  NetArea: "14.04739",
  Height: "4000.",
  Width: "200.",
  Length: "4000.",
  Hyperlink: "_URL_"
}
{
  TypeMark: "20",
  Keynote: "--KEYNOTE--",
  StoreyName: "Level: Level 1",
  TypeDescription: "--DESCRIPTION--",
  StatusConstruction: "New Construction",
  NetArea: "3.18957899999998",
  Height: "2134.",
  Width: "915.",
  SillHeight: "0.",
  Hyperlink: "--URL--"
}

Good job! You are now ready for the Advanced Example

Last updated