'how to change customer.value to "customer"."value" in snowflake. which removes [,],[0-9] in between the string

create or replace procedure sp()
    returns VARCHAR
    language javascript
    as
    $$
    var A= ('Customers[0].value'.replace(/\[|\]|[0-9]/g,'')).replace(/(\\w+)/g,'""');
    return A;
    $$;
call sp();


Sources

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

Source: Stack Overflow

Solution Source