code: function cleanUpModel(bbDocumentModel) {
      var x;
      for (x in bbDocumentModel) {
          if (Object.keys(bbDocumentModel[x]).length === 0) {
              delete bbDocumentModel[x];
          }
      }
      var data = bbDocumentModel.data;
      for (x in data) {
          if (Object.keys(data[x]).length === 0) {
              delete data[x];
          }
      }
  }
docs: Intermediate JSON is the initially converted JSON model from raw data, convert model based on