Removing trailing and leading double quote from a string

“endpoint_body[:reportRequests][0][:pageToken]”
here how can remove double qoute

First you need to be aware that if you really have a string with quotes fore and aft it will display in Ruby as: “\“string\’”. Ruby will always show a string in quotes but they are not really in the string. Should you really have a string with quotes in it string.sub /^\”/. “” will get rid of the leading quote.
Be well,
Mike

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs