function parseFlatJSON(jsonFilePath, attributeFields) {
  return new Promise((resolve, reject) => {
    try {
      json(jsonFilePath, data => resolve(_transformToHierarchy(data, attributeFields)));
    } catch (err) {
      reject(err);
    }
  });
}
function parseFlatJSON(jsonFilePath, attributeFields) {
  return new Promise((resolve, reject) => {
    try {
      json(jsonFilePath, data => resolve(_transformToHierarchy(data, attributeFields)));
    } catch (err) {
      reject(err);
    }
  });
}
function parseFlatJSON ( jsonFilePath , attributeFields ) { return new Promise ( ( resolve , reject ) => { try { json ( jsonFilePath , data => resolve ( _transformToHierarchy ( data , attributeFields ) ) ) ; } catch ( err ) { reject ( err ) ; } } ) ; }
parseFlatJSON - Parses a flat JSON file into a hierarchy structure.

@param {string} jsonFilePath Path to flat JSON file to be parsed.
@param {array<string>|undefined} attributeFields Set of `link` fields to be used as attributes

@return {Promise} Returns hierarchy array if resolved, error object if rejected.
parseFlatJSON - Parses a flat JSON file into a hierarchy structure .