Parsing JSon in Classic ASP with ASP Xtreme Evolution Parsing JSon in Classic ASP with ASP Xtreme Evolution json json

Parsing JSon in Classic ASP with ASP Xtreme Evolution


Try the following (based on the given JSON):

Dim ArticleGroupdim key : For Each key in ProductInfo.Product.keys()    Response.Write ProductInfo.Product.ID ' Prints 6666    Response.Write ProductInfo.Product.Name ' Prints Tha Name                For Each ArticleGroup In ProductInfo.Product.Get("ArticleGroup") '' iterate all ArticleGroup entries        Response.write ArticleGroup.Get("Title") '' get the correct key value    NextNext

You need to iterate all ArticleGroup entries and get the value through .get(keyName). Otherwise it will return the JScript function body instead.