1

Using Raven Studio's patch interface, I have the following patch script: this.Market = this.Market.replace(" Los Angeles","Los Angeles") to remove a prepended space.

Which would be fine for a field with single-value strings, but my data is structured as a JSON object: "Market": [ " Los Angeles", "Chicago", " New York City"],

And running the patch throws the error, "TypeError: Object has no method 'delete'." How can I work around this?

Eric Johnson
  • 59
  • 1
  • 7

1 Answers1

1
var m= this.Market;
for(var i=0; i < m.length; i++) {
this.Market[i] =  m[i].replace("Los Angeles","Los Angeles");
}
Akbar Taghipour
  • 334
  • 6
  • 23