cancel
Showing results for 
Search instead for 
Did you mean: 

get value from JSON Object

sakshik
Star Contributor
Star Contributor

var path = args.path
function main()
{
var docNode = companyhome.childByNamePath(path);
model.foo = docNode;
}
main();

The above script returns an object

Node Type: {http://www.alfresco.org/model/content/1.0}folder Node Ref: workspace://SpacesStore/8e9a9f49-0d33-41b4-9c4a-ad9d172d3f02

Is there a way to retrieve Node Ref from this?

1 ACCEPTED ANSWER

mikel_asla
Star Contributor
Star Contributor

Hi, 

That childByNamePath method is returning a  ScriptNode so it should be docNode.nodeRef

View answer in original post

1 REPLY 1

mikel_asla
Star Contributor
Star Contributor

Hi, 

That childByNamePath method is returning a  ScriptNode so it should be docNode.nodeRef