function createNew(mouseEventData) {
var measurementData = {
visible: true,
active: true,
toolType: 'target',
description: output
};
return measurementData;
}
function onImageRendered(e, eventData) {
var textline = ["Test"];
var obj = { "description":textline};
alert(obj)//[object Object]
var output = JSON.stringify(obj);
alert("output"+output); //output{"description":["Test"]}
}
In the example above, I am seeking assistance on how to dynamically pass a string array (textline) to the 'description' field of measurementData as a JSON object. Any help on achieving this would be greatly appreciated.