Qworum.getData(path)
Reads a value contained in a data container.
▶Example 1
Example 1
try{
const result = await Qworum.getData(['a data']);
if (result instanceof Json){
console.info(The read operation was successful, the result is: ${JSON.stringify(result.value)}
);
} else {
console.info(The data has not been set yet. Did you call Qworum.getData(['a data']) beforehand ?
);
}
}catch(error){
console.error('An unexpected error has occurred during the read.');
}