User bio
404 bio not found
Member since Feb 1, 2021
Posts:
Replies:
You'll use both %Library.DynamicObject and %Library.DynamicArray classes for this. When you do JSON.%Get("Practice") the resulting object is a dynamic array, not a dynamic object, so it works a little differently. Then when you get the first element of the array, you have another dynamic object. Try:
//Get the array Practice
set array = JSON.%Get("Practice")
//Get item 0 from the array we just got
set nodejson = array.%Get(0)
//Get the value of Node
set node = nodejson.%Get("Node")
//Write the value out (or do whatever else you need)
write node
Is there a write command happening somewhere in your method before you try to set the header? If so, the headers will be sent before the write command, and will mean that it's too late to modify them after that. You can check %response.InProgress to see if that has already happened.
Certifications & Credly badges:
David has no Certifications & Credly badges yet.
Global Masters badges:
Followers:
Following:
David has not followed anybody yet.
Thanks for pointing that out. I changed just the number when writing the article so I wasn't using real data, and I missed changing it in the first instance!