JSONObject to Environment function implemented