How can str in obj be read as a variable?

 const str=item.tag1.substring(2,10).split(",").join("");
                        const obj={str:{
                            "Value":item.value,
                            "vr":item.vr
                            }
                        }
How can the str in

obj be read as a variable?

Dec.28,2021

doesn't quite understand your description. If you want to use the variable str as the attribute name of obj , you can write

like this.
const str = item.tag1.substring(2, 10).split(',').join('');
const obj = {
  [str]: {
    'Value': item.value,
    'vr': item.vr,
  },
};

problem description is unclear
Please specify the expected result

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-1b354fd-4d620.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-1b354fd-4d620.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?