function loadJSONData(path) {
  // load contents
  let contents = readFileAsText(path)

  // get data from JSON
  let data
  try {
    data = JSON.parse(contents)
  } catch (e) {
    Context().document.showMessage("There was an error parsing data. Please make sure it's valid.")
    return
  }

  return data
}
Loads the JSON file at the specified path and parses and returns its content.

@param {String} path
@returns {Object/Array}