cnquery icon indicating copy to clipboard operation
cnquery copied to clipboard

MQL losses type

Open atomic111 opened this issue 1 year ago • 0 comments

I would like to select a value from a variable depending on the operating system language.

cnspec> auditpolCredentialValidation = { "en-US": "Credential Validation", "de-DE": "Benutzerkontenverwaltung" };  auditpolCredentialValidation[windows.computerInfo['OsLocale']]
failed to compile: incorrect argument 0: expected string got dict

how to build it

cnspec> auditpolCredentialValidation = { "en-US": "Credential Validation", "de-DE": "Benutzerkontenverwaltung" };  auditpolCredentialValidation["de-DE"]
auditpolCredentialValidation[de-DE]: "Benutzerkontenverwaltung"
cnspec> windows.computerInfo['OsLocale']
windows.computerInfo.OsLocale: "de-DE"

atomic111 avatar Dec 09 '23 08:12 atomic111