On Fri, 28 Dec 2018 at 14:19, fugee ohu <fugee...@gmail.com> wrote:
>
>
>
> On Friday, December 28, 2018 at 8:38:14 AM UTC-5, Colin Law wrote:
>>
>> On Fri, 28 Dec 2018 at 12:58, fugee ohu <fuge...@gmail.com> wrote:
>> > ...
>> > Yes the sources tab showed the script and it's output, a string, but how 
>> > do I parse it into an object?
>>
>> If it is a JSON string then JSON.parse should do it.  If it is not
>> then perhaps you need to strip something off to get to be valid JSON.
>> Not sure what any of this has got to do with Rails.
>>
>> Colin
>
>
> It does of course have to do with rails That's why I asked here The reason it 
> has to do with rails is because I'm working within the rails console of my 
> app which I'm trying to scrape data for JSON.parse returns invalid token

Dos the string look like valid json to you?

Colin

>
> --
> You received this message because you are subscribed to the Google Groups 
> "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to rubyonrails-talk+unsubscr...@googlegroups.com.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/rubyonrails-talk/15d9c5ff-f243-4016-a4dd-a7ba43041658%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLvZG350Cs8tKmzHDmCwP6aMM8FJ%2BE-CtA38bZoBZFE4Og%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to