I'm struggling with extracting a parameter of a JsonObject I retrieve from my server.
public class DAO : MonoBehaviour
{
private void Start()
{
StartCoroutine(GetRequest("http://localhost:5001/dangermonsters/us-central1/ping"));
}
private IEnumerator GetRequest(string uri)
{
UnityWebRequest uwr = UnityWebRequest.Get(uri);
yield return uwr.SendWebRequest();
if(uwr.result == UnityWebRequest.Result.ConnectionError)
{
Debug.Log("Error while sending" + uwr.error);
} else
{
Debug.Log(uwr.downloadHandler.text);
}
}
}
This is what it's printed
{"status":true}
How can I retrieve the "status" parameter inside the object received from the server?