AnsweredAssumed Answered

Retrieve all properties belonging to a given aspect

Question asked by leonardo.celati on Nov 12, 2014
Latest reply on Nov 18, 2014 by leonardo.celati
I have searched a lot on this argument, but I couldn't find a proper solution. I mean, I can access easily all the properties, and iterate trough it, but I am not able to dinamically access only those properties related to a given aspect.

Supposing I have an aspect xy with properties xy:name and xy:surname, this code fragment should explain it all:

var properties = node.getAspectPropertiesOnly('xy:myAspect'); // <— just an example this method does not exists
for (key in properties) {
    logger.log(key + "=" + properties[key]);
    // do some operation…

Should output

name = my name
surname = my surname