I'm trying to integrate our ERP-system into our website. I'm able to get some json responce from the system. But I really need some help parsing it.
I'm using ASPJSON (www.aspjson.com) to help me.
The question is how do I get all the fields from "Data". I'm able to get the DebtorId, but I'm unable to figure out how to get the other.
JSON response:
"Data":{"DebtorId":1,"Data":
[{"Id":"Felt01","Label":"Navn","Value":"Testmedlem"},
{"Id":"Felt14","Label":"Bemærkninger","Value":""},
{"Id":"Felt15","Label":"Oprettet den","Value":null},
{"Id":"Felt16","Label":"Sidst rettet","Value":"2015-12-04T22:56:36"},
{"Id":"Felt23","Label":"Udmeldt","Value":null},
{"Id":"Felt12","Label":"Note","Value":""},
{"Id":"Felt02","Label":"Adresse 1","Value":"Adresse 1"},
{"Id":"Felt03","Label":"Postnr","Value":""},
{"Id":"Felt04","Label":"Bynavn","Value":""},
{"Id":"Felt05","Label":"Mobiltelefon","Value":""},
{"Id":"Felt06","Label":"Adresse 2","Value":""},
{"Id":"Felt07","Label":"Telefon","Value":""},
{"Id":"Felt08","Label":"Efternavn","Value":""},
{"Id":"Felt10","Label":"Email","Value":""},
{"Id":"Felt24","Label":"Aktiv","Value":false},
{"Id":"Felt09","Label":"Grupper og roller","Value":[]},
{"Id":"Felt11","Label":"Medlemskontingent","Value":0},
{"Id":"Felt13","Label":"Medarbejdernr","Value":""},
{"Id":"Felt17","Label":"Ansættelsessted","Value":{"Id":0,"Code":null,"Value":null}},
{"Id":"Felt18","Label":"Land","Value":""},
{"Id":"Felt19","Label":"Medlemsnummer","Value":1},
{"Id":"Felt20","Label":"Donation","Value":0.0},
{"Id":"Felt21","Label":"WebID","Value":0}]},
"WinkasErrorCode":0,"WinKasStatus":0,"WinKasStatusString":"Okay",
"WinKasMessage":null,"ApiVersion":"1.1.888.91",
"ResponseDateTime":"2015-12-04T23:23:19"
Classic ASP:
Response.Write "<p>Result (single):" & requestBody.data("DebtorId").item(phonenr) & "</p>"
For Each phonenr In requestBody.Data
Set this = requestBody.data("Data").item(Id)
Response.Write _
this.item("type") & ": " & _
this.item("number") & "<br>"
Next