I'm messing around with the API and interacting with decks. I can find a deck of cards and I can save it to the state using something like: let myDecks = findObjs({ type: "deck", name: deckName });
myDeck = myDecks[0];
At which point myDecks will look something like this (according to the console): [{\"name\":\"Savage Worlds Action Deck\",\"_currentDeck\":\"-MC361HgaZyBam9E9OLT,-MC34mGFbUkZEhbb0foS,-MB5uYIAFs9R_zz1Bzw1,-MC37WAOrc2hR6TfygRS,-MC36d-btzxxLauf5POe,-MC35BWV2-2Yn52JqZig,-MC36DLsMI5BKS3RVF_z,-MC37G66rmDwgEdfVEVP,-MC34cixnF7xYkJs1LHo,-MC374Q0zfSSTdVvFbWe,-MC37BIVr3yQyL53nU6k,-MAlY4kRJ-nrDg40Aa-i,-MC36KPmJoAuosEl0zvp,-MC37STc_riCbgswlQPH,-MC34RQHyOVPRUrPdIRg,-MC36s28v8OotY5GjlQF,-MC34j0qZAqG1vR7rk-u,-MC35XArCj-hNTSMGRxo,-MC34JnK38E3MEWvPE9b,-MC365AEtIh2iuYXMbh5,-MC36X0QPI3V3o4WkcJb,-MC34XEQBacBgCCOLlnF,-MC33vN9Fri-dM-P_YD1,-MC35P7SjlKGCKEYS19U,-MC35n1lZmMySCrJPg9Z,-MC35bUTM2_6bVEzMy98,-MC35x31dmPRR7WfhOWu,-MC3691Nd82cg2OPik5f,-MC353wCgnatsULADXyH,-MC35K3-NUWgCQS7mgdC,-MC36T9zEG9ukwFVnQxU,-MC36lgEAh7CJS6X4o55,-MC36_VVC69_gwsC93vQ,-MB5yQxYpdmCZfBHDwhH,-MC347VjUFacxAR6HBbK,-MB5uD2iDpk8ZpTzg8fx,-MC340ij3eot8tPzykK-,-MC33Qr9VIGgXp9tNCE8,-MC37KTaeapfKIjhxqVX,-MB5yo9qhnMTgWUFHWM8,-MC378U9YLyDE8h4IKYC,-MC37cQo1Is9_lSDTfoC,-MC36OEpVj1PFZoSa6Vb,-MC35Sv2jVHULKyNqasj,-MC34E_NiOxuICEZ5swm,-MC36g_oghvrydYG_460,-MC37ON1NXkwlc4EbIyZ,-MC358S9TsE2EGtKja38,-MC35hBN1_1CCNlV-bc8,-MC36wKhDfWjoGVtZWMC,-MC33X9o2tPc-qsWvfGN,-MC37hoK4ZnqLgUPLM93,-MAlY3ABl-6JA3ehtNQG,-MC37-ZPGIdbFpuURlu2\",\"_currentIndex\":5,\"_currentCardShown\":false,\"showplayers\":true,\"playerscandraw\":true,\"avatar\":\"<a href="https://s3.amazonaws.com/files.d20.io/images/146222369/7ZQpp5oRPT9W--6YG5ZhGg/med.png?1593190393\",\"shown\":true,\"players_seenumcards\":true,\"players_seefrontofcards\":true,\"gm_seenumcards\":true,\"gm_seefrontofcards\":true,\"infinitecards\":false,\"_cardSequencer\":2,\"cardsplayed\":\"faceup\",\"defaultheight\":\"\",\"defaultwidth\":\"\",\"removedcardsmode\":\"choosefronts\",\"removedcards\":\"none\",\"discardpilemode\":\"none\",\"treatasdrawing\":false,\"showhands\":true,\"infinitecardstype\":\"random\",\"_discardPile\":\"\",\"_type\":\"deck\",\"_id\":\"-MAlXbeomkbytE3PaRZ-\" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/146222369/7ZQpp5oRPT9W--6YG5ZhGg/med.png?1593190393\",\"shown\":true,\"players_seenumcards\":true,\"players_seefrontofcards\":true,\"gm_seenumcards\":true,\"gm_seefrontofcards\":true,\"infinitecards\":false,\"_cardSequencer\":2,\"cardsplayed\":\"faceup\",\"defaultheight\":\"\",\"defaultwidth\":\"\",\"removedcardsmode\":\"choosefronts\",\"removedcards\":\"none\",\"discardpilemode\":\"none\",\"treatasdrawing\":false,\"showhands\":true,\"infinitecardstype\":\"random\",\"_discardPile\":\"\",\"_type\":\"deck\",\"_id\":\"-MAlXbeomkbytE3PaRZ-\</a>"}] However, I'm still unable to use as a JSON object (at least, when I try to do something like this): cardDeck = myDeck;
log("cardDeck: " + cardDeck["name"]); the log shows cardDeck as undefined. I'm assuming it has to do with the escaped double-quotes? What do I have to do in order to be able to use that object?