As expansion of @ctrlplusb answer,
I would suggest you to also take a look to the env-dot-prop package.
It allows you to set/get properties from process.env
using a dot-path.
Let's assume that your process.env
contains the following:
process.env = {
FOO_BAR: 'baz'
'FOO_