function addSameNameTagObject(token, tagObject, json) {
		var tagObjArray = [];
		
		// If the current scope is an array, then get the last object in the array and add the new node there
		if (Array.isArray(json)) {
			json = json[json.length-1];

			if (!json[getTagName(token)]) {
				json[getTagName(token)] = tagObject;
			}
			else if (Array.isArray(json[getTagName(token)])) {
				json[getTagName(token)].push(tagObject);
			}
			else {
				tagObjArray.push(json[getTagName(token)]);
				tagObjArray.push(tagObject);

				json[getTagName(token)] = tagObjArray;
			}
		}

		// if there is already an array here, then just push the new node object to it
		else if (Array.isArray(json[getScope()][getTagName(token)])) {	
			json[getScope()][getTagName(token)].push(tagObject);
		}
		// else create the array and place the existing object in it, followed by the new object
		else {
			tagObjArray.push(json[getScope()][getTagName(token)]);
			tagObjArray.push(tagObject);
			
			// replace the existing scope object with tagObjArray
			json[getScope()][getTagName(token)] = tagObjArray;
		}
	}
/*
	*	Adds an object array when an object already exists in a certain scope
	*	@param {String} token - An xml tag
	*	@param {object} tagObject - a tagObject created from the createObjectFromTag method
	*	@param {object} json - the json object currently being built
	*/
Adds an object array when an object already exists in a certain scope
@param {String} token - An xml tag
@param {object} tagObject - a tagObject created from the createObjectFromTag method
@param {object} json - the json object currently being built
Adds an object array when an object already exists in a certain scope @param { String } token - An xml tag @param { object } tagObject - a tagObject created from the createObjectFromTag method @param { object } json - the json object currently being built
function addSameNameTagObject(token, tagObject, json) {
		var tagObjArray = [];
		if (Array.isArray(json)) {
			json = json[json.length-1];
			if (!json[getTagName(token)]) {
				json[getTagName(token)] = tagObject;
			}
			else if (Array.isArray(json[getTagName(token)])) {
				json[getTagName(token)].push(tagObject);
			}
			else {
				tagObjArray.push(json[getTagName(token)]);
				tagObjArray.push(tagObject);
				json[getTagName(token)] = tagObjArray;
			}
		}
		else if (Array.isArray(json[getScope()][getTagName(token)])) {	
			json[getScope()][getTagName(token)].push(tagObject);
		}
		else {
			tagObjArray.push(json[getScope()][getTagName(token)]);
			tagObjArray.push(tagObject);
			json[getScope()][getTagName(token)] = tagObjArray;
		}
	}
function addSameNameTagObject ( token , tagObject , json ) { var tagObjArray = [ ] ; if ( Array . isArray ( json ) ) { json = json [ json . length - 1 ] ; if ( ! json [ getTagName ( token ) ] ) { json [ getTagName ( token ) ] = tagObject ; } else if ( Array . isArray ( json [ getTagName ( token ) ] ) ) { json [ getTagName ( token ) ] . push ( tagObject ) ; } else { tagObjArray . push ( json [ getTagName ( token ) ] ) ; tagObjArray . push ( tagObject ) ; json [ getTagName ( token ) ] = tagObjArray ; } } else if ( Array . isArray ( json [ getScope ( ) ] [ getTagName ( token ) ] ) ) { json [ getScope ( ) ] [ getTagName ( token ) ] . push ( tagObject ) ; } else { tagObjArray . push ( json [ getScope ( ) ] [ getTagName ( token ) ] ) ; tagObjArray . push ( tagObject ) ; json [ getScope ( ) ] [ getTagName ( token ) ] = tagObjArray ; } }
Adds an object array when an object already exists in a certain scope
       @param {String} token - An xml tag
       @param {object} tagObject - a tagObject created from the createObjectFromTag method
       @param {object} json - the json object currently being built
Adds an object array when an object already exists in a certain scope @param { String } token - An xml tag @param { object } tagObject - a tagObject created from the createObjectFromTag method @param { object } json - the json object currently being built
// If the current scope is an array, then get the last object in the array and add the new node there // if there is already an array here, then just push the new node object to it // else create the array and place the existing object in it, followed by the new object // replace the existing scope object with tagObjArray