get value from JSON Object

cancel
Showing results for 
Search instead for 
Did you mean: 
sakshik
Established Member

get value from JSON Object

Jump to solution

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 Solution

Accepted Solutions
mikel_asla
Established Member

Re: get value from JSON Object

Jump to solution

Hi, 

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

View solution in original post

1 Reply
mikel_asla
Established Member

Re: get value from JSON Object

Jump to solution

Hi, 

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