Consider the following example of a JSON structure:
[
{
"id":1,
"position":3,
"articleNumber":"ServiceElement"
},
{
"id":2,
"position":2,
"articleNumber":"ServiceElement"
}
]
Is there a way to transform it into the desired format below?
{
"data":[
{
"data":{
"id":1,
"position":3,
"articleNumber":"ServiceElement"
}
},
{
"data":{
"id":2,
"position":2,
"articleNumber":"ServiceElement"
}
}
]
}
The addition of the data tag is necessary for identifying objects in order to implement a TreeTable. The original JSON structure does not meet the required format for this purpose.