Maybe use contentNode.dataset[data.key] = data.value?