Hello All,
I am trying to change an element from a list of elements, but the correct syntax to access and modify that element internally using a typical controller is not yet available..
Code:
----------- ->
{
"jsonrpc": "2.0",
"id": null,
"result":
{
"code": 200,
"message": "Done",
"result": [
{
"name": "22",
"active_app": true,
"start_date": "2022-07-04 16:41:09",
"end_date": false,
"url2": false,
"zipcode": false,
"country_ids": [
{
"id": 233,
"name": "United States",
"first name": [ 1, "John" ],
- "last_name": [ 1, "Mark" ],
"code": "US",
"address_format": "%(street)s\n%(street2)s\n",
"address_view_id": false,
"currency_id": [ 2, "USD" ],
"image_url": "/base/static/img/us.png",
"phone_code": 1, "country_group_ids": [],
"name_position": "before",
"vat_label": "EIN",
"state_required": true,
"zip_required": true,
"__last_update": "2022-01-12 01:02:51",
"display_name": "United States",
"create_uid": [ 1, "Bot" ],
"create_date": "2022-01-12 01:02:51",
"write_uid": [ 1, "Bot" ],
"write_date": "2022-01-12 01:02:51"
}
],
"partner_id": "res.partner()",
"selected_page": "Sale",
"image": false
},
{
"active_app": true,
"start_date": "2022-08-09 13:56:15",
"end_date": false,
"url2": false,
"zipcode": false
}
]
}
}
----------------------
-> res_country.write({'country_ids''last_name': kwargs['name']})
ex.2:
----------- ->
beyonce = {
"name" : "Beyoncé",
"popularity" : 86,
"type" : "artist",
"uri" : "spotify:artist:6vWDO969PvNqNYHIOW5v0m",
"external_urls" : {
"spotify" : "https://open.spotify.com/artist/6vWDO969PvNqNYHIOW5v0m"
},
"followers" : {
"href" : None,
"total" : 3841151
},
}
and i want to change update the total from 3841151 to 5000
I found this line to be ineffective.
Help me please.