System.Collections.Generic.Dictionary '2 error

Hello,
I use Firebase cloud functions, and I get this data:

This is Firebase log:

{ ‘example’: ‘something’, name: ‘John’ }

So it’s work, but I want to handle the data received in Unity.

So unity C#:

FirebaseFunctions.DefaultInstance.GetHttpsCallable("getSomething")
.CallAsync(data).ContinueWith((task) =>
{
if (task.IsFaulted)
{
          // Handle the error...
          print("error");
}
else if (task.IsCompleted)
{
  print("result:" + task.Result.Data);
}

Unity log:

result:System.Collections.Generic.Dictionary`2[System.Object,System.Object]
UnityEngine.MonoBehaviour:print(Object)

I want to handle the data.

I tried IDictionary, example: IDictionary snapshot = (IDictionary)task.Result.Data; and then print(snapshot["name"]) but nothing…

Thanks!

I am new to unity and programing in general so there might be better way to do this…

But for some reason methods cannot be run from CallAsync tasks only variables can be assigned. So you need to declare IDictionary snapshot at class level and do

else if (task.IsCompleted)
 {
   snapshot = (IDictionary)task.Result.Data;
 }

then you can use snapshot[“name”] in other methods.