Hello
You get json data from the address written below. There is no problem when there is only one registration. But I cannot list many records. It gives an error "Object field not found (Key)". What do I have to do to list the records? Help please.
Code;
Host = "jsonplaceholder.typicode.com/";
HTTPRequest = New HTTPRequest;
// HTTPRequest.ResourceAddress = "todos/1";
HTTPRequest.ResourceAddress = "photos/" ;// ThisObject.Attribute2;
HTTPConnection = New HTTPConnection(host,,,,,10,New OpenSSLSecureConnection);
HTTPAnswer = HTTPConnection.Get(HTTPRequest);
stringAnswer= HTTPAnswer.GetBodyAsString();
JSONReader = New JSONReader;
JSONReader.SetString(stringAnswer);
JsonResult = ReadJson(JSONReader,True);
For each strResult in JsonResult Do
If (strResult.Key = "url") Then
Message(strResult.Value);
EndIf;
EndDo;
The 1C:Enterprise developers forum