Can variables be written in legend.selected in echarts? Why are the variables I wrote treated as strings?

can variables be written in legend.selected in echarts? Why are the variables I wrote treated as strings?

            console.log(aa);
             optionFH.legend.selected={
                      aa:true,
                      "xx":true,
                      "xx":true,
                         "xxx":false,
                         "xxx":false,
                  }
                  

the print result is as follows.
clipboard.png

Why is my aa treated as a string? How can I get the browser to resolve to variables?

Mar.25,2021

The variables of the

object are saved in the format of a string, here you can

optionFH.legend.selected[aa] = true

however, it is important to note that the variables of the object mentioned just now are saved in the format of a string . If your aa is an object, then

var a = {} , b = {c:1}
a[b] = true; //a{[object Object]:true}

automatically calls toString to convert the object to a string

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1c2ed81-33c2d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1c2ed81-33c2d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?