function getMessageHeader(vMessage) {
		var bIsArray = Array.isArray(vMessage),
			oMessage = bIsArray ? vMessage[0] : vMessage;

		return JSON.stringify(Object.assign(
			oMessage, {details : bIsArray ? vMessage.slice(1) : []}
		));
	}
Gets a string representation of the given messages to be used in "sap-message" response
header. In case of multiple messages, the first message is the outer message and the other
messages are stored as inner messages in the "details" property.

@param {object|object[]} vMessage
  A message object or an array of message objects as returned by an OData V2 service.
@returns {string}
  A stringified representation of the given messages