* OVLB is a class attached to a form. One of its properties is a string containing json-data * In this example it comes in utf8 which I convert to ansi thisform.oVLB.cJson = STRCONV(thisform.oVlb.cJson,11) * Then I create an object just by callimg the functio oJson = nfjsonread(thisform.oVLB.cJSon) && It gets the json string as parameterNow you habe to see what data you need. You should know what data you get. In my case I have a description which starts like this:
{ "content": [ { "id": <value>, "version": 1, "identifier": <value>, "isbn": <value>, "issn": <value>, "gtin": <value>, .......My object know contains an array-property/collection of objects called "content". I can check it in the debugger and see what it contains by itself. Every element is a record. So when I am processing it, I loop through the array:
FOR i = 1 TO ALEN(oJson.content) * Within the loop I collect the data needed. For example, the above mentioned field "isbn". IF NOT ISNULL(oJson.content[i].isbn) replace isbn WITH oJson.content[i].isbn ELSE replace isbn WITH oJson.content[i].gtin Endif ......... NextI hope this helps a bit.