Javascript Instanciate new Object with dynamic parameter from String : I would like to instantiate a new object with dynamic parameters coming from an exernal String. 


Here is the code:

    const editorInstance = new Editor('#edit', 
	placeholderText: null,
	theme: 'dark',
	language: 'en',
	linkList:[{text: 'test',href: 'test',target: '_blank'}],
	events: {
	    initialized: function () {
	    const editor = this
	    this.el.closest('form').addEventListener('submit', function (e) {
	       jQuery('#gs_editor_content').hide();
	   	   jQuery(this).append('<div class="loadingDiv">&nbsp;</div>');
	       o.script});
		texta = jQuery('#myeditor').find('textarea');
		targetFile = texta.attr('rel');
		content = editor.$oel.val();
		e.preventDefault();
		var fd = new FormData(); 
		fd.append( 'name' ,targetFile);
		fd.append( 'html', editor.$oel.val() );
		$.ajax({
			url : 'http://localhost/Update',
			type : 'POST',
			data: fd,
			processData : false,
			contentType : false,
			async : false,
			success : function(data, textStatus, request) {
			}
		});
        jQuery('#myeditor').dialog("close");

		})
		}
		}
		})

I would need to modify the parameters `linkList` before instantiating my object as I receive a new list received from my server.

I tried to use eval or parseFunction but I encounter an unexpected identifier error.

any idea how I can achieve this ?