Can't store API keys in an array in "netlify.toml"

I’m new to Netlify
My netlify.toml looks like:

[context.production]
  command = "yarn build"

  [context.production.environment]
    SERVICE1_API_KEY = "api key"
    SERVICE2_API_KEYS = [
      "api key 1",
      "api key 2"
    ]

However, in the Netlify build process, I’m getting:

: json: cannot unmarshal array into Go struct field extendedBuildConfig.Config.build.environment of type string

I know it has to do with the array because I tried to remove it and then the build process completed successfully

Yup, environment variables can only be strings, so you could use:

  SERVICE2_API_KEYS = "api key 1, api key 2"

… or you could set two separate variables for them and use them that way instead