This params2 got "version". Why did you put the double quotation marks?

can"t you write this way to get the dynamic key value?

        let params= this.search.content;

        let params2= this.search.type;

        try {
      
          let ret = await this.$Api.Sysconf.ExPro.Query (
            {
              pageSize: this.pageSize,
              pageNumber:page,
              params2:params
            })

this params2 gets "version". How to remove the double quotation marks

Feb.25,2022

if it is a string, directly Number (params)


let data = {
    version:'v1.0.5'
}
let version = data[params2];

I don't know if that's what you mean. You can take the value directly through obj [prop]

when saving as an object.

if dynamic is used as a key value, you can use it like this:

[params2]: params

you can directly use replaceAll () to match out double quotes

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