Is there a native/easy way to parse an object laid out in text to an actual object variable in javascript? For example:
data.group.name=1
data.group.name2=text
data.group.name3[0][0]=123
data.group.name3[0][1]=124
data.group.name3[1][0]=500
data.group.name3[1][1]=501
and convert it to json:
{
data: {
group: {
name: 1,
name2: 'text',
name3: [
[123,124],
[500,501],
]
}
}
}
I mean I can brute force it to a degree with split/foreach but there's gotta be a native way for it.