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.