Forum Discussion
New2API
6 years agoFrequent Contributor
richie if custodian is subnode under meta then your code is correct.
If meta and custodians are separate nodes then all you have to do is -
def custodianval = object.custodian
One more thing to consider if those nodes are an array i.e., nodes are in [ ].
If so then you need to reffer that using a counter.
for ex:
object = {meta: [], custodian: [{name:test1, id:1}, {name:test2, id:2}] }
def cutodianval = object.cutodian[0] .name would give you test1
hope this helps.
Related Content
- 5 years ago
- 5 years ago
Recent Discussions
- 5 days ago
- 10 days ago