I have this JS:
function SetAPIValue(key1, value1, scormVersion, methodCalled) {
if (key1 == true || key1 == false) { }
else
{
alert("value1 = " + value1);
/* value1 came back with two values for cmi.suspend_data! */
var obj = {
key: key1,
value: value1
}
setValuesArray.push(obj);
}
somehow or another value1 contains two values for key1, how can I spit them when I push to my array so each value and key is in a row?
thanks
If
value1is an array containing multiple values:Note this will leave you with multiple objects with the same key, which may not be desirable.