Hello community,
I have N data records with K properties in each of them. I would like to make a JSON array with this data. i.e.
{
"data":[
{
"property1":"text"
.....
"propertyK":"text"
},
{
"property1":"text"
.....
"propertyK":"text"
},
..... (N times)
]
}
Just adding 'Data to JSON' component gives me an array of JSONs, i.e.
{
"property1":"text"
.....
"propertyK":"text"
}
{
"property1":"text"
.....
"propertyK":"text"
},
..... (N times)
No Pilot Script manipulation helps:
- 'Data to JSON' doesn't eat HashTable (I need to keep all property names in JSON as well);
- 'Data to JSON' doesn't keep a property name if I do an array of arrays.
I can do some string manipulations, but is there any chance to do it otherwise?