I have a JSON that looks like this
[
{
"itemLabel":"Social Media",
"itemValue":90
},
{
"itemLabel":"Blogs",
"itemValue":30
},
{
"itemLabel":"Text Messaging",
"itemValue":60
},
{
"itemLabel":"Email",
"itemValue":90
},
]
I want to place all of those objects into an array to manipulate it easier in one of my code. Thus I want to do something like
[
{
"data": [
{
"itemLabel": "Social Media",
"itemValue": 90
},
{
"itemLabel": "Blogs",
"itemValue": 30
},
{
"itemLabel": "Text Messaging",
"itemValue": 60
},
{
"itemLabel": "Email",
"itemValue": 90
}
]
}
]
How do I go about to add in that data array element using Jackson? I have done mostly read using Jackson but have not done too many writes. Any help would be appreciated.