Hi all,
In my app I have an app variable called deck_mames = ["a","b","c",...,"i"]
which hold the names of nine decks. I have another variable called cards_in_deck
, which is an object with 9 properties, each property being a list of text holding the card IDs containing in each deck:
{
“decks”: {
“a”: [“cardID1”,“cardID2”,…,“cardIDn”],
“b”: [“cardID12”,“cardID13”,…,“cardIDn”],
.
.
.
“i”: [“cardID92”,“cardID93”,…,“cardIDn”]
}
}
Depending on the decision the user takes, I need to take, a cardID
from a deck x
and move it to a deck z
, x
and z
being any of "a", "b", "c"...., "i"
.
Question: how to use the list deck_names
to select deck x
and deck z
in cards_in_deck
, and assign a new value to only these two properties?