code: function getFlat(entity, json) {
    let flat = {
      entity     : asObject(entity, true),
      collections: getCollectionsCompact(entity)
    };
  
    if (json) {
      flat = JSON.stringify(flat);
    }
  
    return flat;
  }
docs: Get a flat, plain representation of the entity and its associations.
  
  @param {Entity}  entity
  @param {boolean} [json]
  
  @return {{}} {entity, collections}