After analyzing the structure of my data, I found it to be in this format:
{property: ["a","b"], value : "somevalue" , comparison : "somecomparison"}
I am looking for a way to transform it into a nested object like so:
{
"properties": {
"a": {
"properties": {
"b": {
"somecomparision": "somevalue"
}
}
}
}
What would be the most effective approach to implement this nested structure?
{
properties: {
[property[0]: {
[comparison]: value,
},
},
}