I have the following JSON response:
{
"d": {
"results": [
{
"__metadata": {
"id": "c55209ae-2af9-4514-ab02-67f222903f6d",
"uri": "http://ift.tt/1IXDFvS",
"etag": "\"1\"",
"type": "SP.Data.LstDoelenListItem"
},
"scDoelnaam": "Hoofddoel Afdeling",
"scDoellevel": 1
},
{
"__metadata": {
"id": "7e79ab8a-e550-4694-87d4-26d6f5bc6128",
"uri": "http://ift.tt/1IXDCQL",
"etag": "\"1\"",
"type": "SP.Data.LstDoelenListItem"
},
"scDoelnaam": "Subdoel 1",
"scDoellevel": 2
},
{
"__metadata": {
"id": "c204acca-0362-4bd6-a66b-00236a2320cb",
"uri": "http://ift.tt/1z9xPxA",
"etag": "\"1\"",
"type": "SP.Data.LstDoelenListItem"
},
"scDoelnaam": "Subdoel 2",
"scDoellevel": 2
},
{
"__metadata": {
"id": "b78b2416-7813-4e64-a920-f9ba377fa36d",
"uri": "http://ift.tt/1IXDFvU",
"etag": "\"1\"",
"type": "SP.Data.LstDoelenListItem"
},
"scDoelnaam": "Subdoel 3",
"scDoellevel": 2
}
]
}
}
I know how to retrieve the values once I know the column names, but how do I get the 2 column names "scDoelnaam" and "scDoellevel" with Javascript and assign them to variables??
Aucun commentaire:
Enregistrer un commentaire