HubL code

        

const newObject = [
    {% for item in module.field_group %}
        {
        "col_name": "{{ item.col_name }}",
        "input_type": "{{ item.input_type }}"
        }{% if not loop.last %},{% endif %}
    {% endfor %}
];

console.log("?? newObject", newObject);

        
    

Result JSON escaped from JavaScript

        

        
    

Please check the console for the result, and see how object newObject works on JavaScript