'Get variable value from terraform cloud

I have data result:

test = [
      + {
          + category  = "terraform"
          + hcl       = false
          + id        = "var-1adsJ88M"
          + name      = "myValue"
          + sensitive = false
          + value     = "keys"
        },
      + {
          + category  = "terraform"
          + hcl       = false
          + id        = "var-WcFasdas1"
          + name      = "potoken"
          + sensitive = false
          + value     = "b6adasd222gt5Nh("
        }
       ]

How to get value a specific name.

Example: I need get value from of name myValue. This name can be in any position, I need to search the array

My attempts:

output "variables_cloud" {
  value = data.tfe_variables.test.variables[*].name == "myValue"
}


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source