The following code replaces only one single quote:
This looks suspiciously like bad JSON, so I suggest using actual array and object literals, then encoding the proper way:
var a = [{'column1':'value0','column2':'value1','column3':'value2'}]; var b = JSON.stringify(a);