Parsing json string

I need to parse the following json


{
   "12":{
      "Time":"2021-03-22-15:56:25",
      "Name":"John"
   },
   "13":{
      "Time":"2021-03-22-15:56:25",
      "Name":"Jane"
   }
}

My struct is as follows

USTRUCT(BlueprintType)
struct FNameStruct
{
    GENERATED_BODY()

    UPROPERTY()
    FString  Time;
    
    UPROPERTY()
    FString  Name;
};

I have been unable to figure out a way to do this using the JsonUtilties. Note that if I modify the the json string to the following, I can easily use FNameStruct and TArray to parse the json.

{
   "people":[
      {
         "Time":"2021-03-22-15:56:25",
         "Name":"John"
      },
      {
         "Time":"2021-03-22-15:56:25",
         "Name":"Jane"
      }
   ]
}

Lot of the questions in this forum explain how to parse the second string where there is a list which can easily be mapped to TArray. I was wondering if there is an elegant way of parsing the first json string such that we have an array of FNameStruct.

Thanks.

Arrays built as json objects are very un-elegant so I very much doubt there’s any elegant way to parse it.

//FString JsonString;
TSharedPtr<FJsonObject> JsonObject;
auto Reader = TJsonReaderFactory<>::Create(JsonString);
if (FJsonSerializer::Deserialize(Reader, JsonObject))
{
    TArray<FNameStruct> Array;
    int Index = 0;
    while (true)
    {
        const TSharedPtr<FJsonObject>* JsonItem;
        if (JsonObject->TryGetObjectField(FString::Printf(TEXT("%i"), Index), JsonItem))
        {
            Array.Emplace();
            FJsonObjectConverter::JsonObjectToUStruct<FNameStruct>(JsonItem->ToSharedRef(), &Array[Index]);
            Index++;
        }
        else
            break;
    }
}

Thank you! this works.

Anyone Knows how to do the same in blueptrints?