How to access a document property value using the Javscript api for Spotfire?

I have a requirement wherein I have to store value of a label to a variable. I see that there is a function called getDocumentProperty().But I'm not able to understand its signature listed as: function getDocumentProperty(propertyName, callback); So I want something like below. var value=getDocumentProperty("property_name", callback function); Could somebody provide an example to illustrate(esp. the callback function)? Thanks

(2) Answers