I am working the the LogMeIn Central API and in the body of my request I need to send some Json. I have this:
host_ids = LmiHost.all.collect {|lmi| lmi.host_id}.join ', '
create_servicetag_report_request.body = {hostIds: host_ids, fields: 'ServiceTag'}.to_json
This turns the body into
{\"hostIds\":\"5888, 6225, 214752\",\"fields\":\"ServiceTag\"}
how can i remove the
\"
from this section:
\"5888, 6225, 214752\"
it is not suppose to have quotes around it.
I am using Ruby on Rails