updateMetadataFieldValue = (state, nameAttr, value) => {
  let tmpState = cloneDeep(state);
  eval(`tmpState.${nameAttr} = value`);
  return tmpState.metadata;
}
Returns the metadata of the state with the updated value of given path(nameAttr).
If the field does not exist, creates a new field. Does not mutate the given state.
@param {Object} state
@param {String} nameAttr
@param {String} value
@return {Object} metadata