Below is an array that needs to be transformed into a JSON object:
data = [
"Id = 2",
"time = 10:59",
"Topic = xxxxxxxxxxxxxxxx",
"GUEST3",
"Role = GS",
"Infos = Connecticut",
"GUEST4",
"Role = HS",
"Infos = Delaware",
"GUEST5",
"Role = CS",
"Infos = Hawaii"
]
I am looking to convert it into the following JSON object structure:
data = [
{
Id : 2,
time : '10:59',
Topic : 'xxxxxxxxxxxxxxxx',
GUEST3:
{
Role : 'GS',
Infos : 'Connecticut',
}
GUEST4:
{
Role : 'HS',
Infos : 'Delaware',
GUEST5:
{
Role : 'CS',
Infos : 'Hawaii'
}
}