How to add a value to array which has set of dictionaries?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Mani Vannan

I have little confusion here in handling the arrays and dictionaries
I have a example script here:

Var test = {“A”:10, “B”:10}

If I have to change the values of this var I would do something like this
func _on_button_pressed():
test[“A”] += 10
test[“B”] -= 1

If my var looks like this

Var test = [{“A”:10}, {“B”:10}]

If it was a array I would call it with its index like
test[0]
But since it is a array of dictionaries how would i call it in the
Function to change the values according to their index in the array
Like how to call the dictionary containing {“A”:10} by test[0] , {“B”:10} by test[1]
Thank you in advance.

:bust_in_silhouette: Reply From: rakkarage
var test = [{"A":10}, {"B":10}]
test[0].A = 15
print(test)