Add an array to a dictionary

i have a dictionary from a json response and i need to add an at the begin and at the end of this dictionary.
this is my json : {
“modification_date” : “2024-04-02T09:49:52.359264819”,
“id” : 34,
“name” : “newDashboardForTesting”,
“edit_mode” : true,
“dashboard_translation” : [ {
“id” : 268,
“label” : "dashboardEN ",
“locale” : “EN”,
“translation_key” : “TITLE”
}, {
“id” : 269,
“label” : "dashboard de ",
“locale” : “DE”,
“translation_key” : “TITLE”
} ],
“dashboard_order” : 0
}
i’m trying to add the so the result:
[{
“modification_date” : “2024-04-02T09:49:52.359264819”,
“id” : 34,
“name” : “newDashboardForTesting”,
“edit_mode” : true,
“dashboard_translation” : [ {
“id” : 268,
“label” : "dashboardEN ",
“locale” : “EN”,
“translation_key” : “TITLE”
}, {
“id” : 269,
“label” : "dashboard de ",
“locale” : “DE”,
“translation_key” : “TITLE”
} ],
“dashboard_order” : 0
} ]
But i dont fint how ?

Either Create List

or Append To List keywords:

In your case, probably later is useful since you might end up adding more than dict into that list.

2 Likes