Read a javascript object, JSON string, or JSON file and replace values like '$foo' with process.env.foo