I am studding the JSON support in PowerBuilder 2019 (R2) and I am a bit confused on how can I obtain the JSON string of a key in an array.
Let's suppose that you have the following JSON:
{
"Sales":[
{
"DiscountType":{
"Id":1,
"Label":"667 trig",
"CatalogList":[
{
"Id":1,
"Label":"01/01/2000 - 31/12/2099"
}
]
}
},
{
"DiscountType":{
"Id":2,
"Label":"777 777",
"CatalogList":[
{
"Id":2,
"Label":"01/01/2000 - 31/12/2099"
}
]
}
}
]
}
How am I supposed to get the second DiscountType as a JSON string?
As far as I understand, JsonParser can not give you JSON blocks. JSONPackage.GetValue() returns a JSON block, however, in my example, I can't tell it to give me the second DiscountType.
So... what am I missing here?