Reputation: 13
I have searched and searched but being unsure how to phrase my queries I have been unable to achieve what i believe is a simple goal.
I have an RSS feed from Deviant Art that is run through Yahoo Pipes
this is the pipe" http://pipes.yahoo.com/pipes/pipe.info?_id=63478be58fb00758ded9d5108170f931
the JSON the pipe produces http://pipes.yahoo.com/pipes/pipe.run?_id=63478be58fb00758ded9d5108170f931&_render=json looks like this:
{"url":"http:\/\/darksilverflame.deviantart.com","content":"Copyright 2012 *DarkSilverflame","description":null,"title":null},
........
What I am trying to achieve is a simple way of parsing the data via jquery(or just JS) and then generating a simple txt list of usernames from the Deviant Art and the links to those users pages.
Upvotes: 0
Views: 110
Reputation: 369
To further on Mehdi's answer: if you are looking for a simple way to retrieve and process the data in one step, you can start with the usual incantation:
$.getJSON('http://pipes.yahoo.com/pipes/pipe.run?_id=63478be58fb00758ded9d5108170f931&_render=json', function(data){ $.each(data.items, function(i, item) { // do something here } } );
http://docs.jquery.com/Ajax/jQuery.getJSON
Upvotes: 0
Reputation: 5438
You can use :
jQuery.parseJSON( json ) Link to jQuery Documentaion
parsedObject =jQuery.parseJSON( '{"url":"http:\/\/darksilverflame.deviantart.com","content":"Copyright 2012 *DarkSilverflame","description":null,"title":null}');
or form Chrome (F12 -> Console then test the folowing)
a = JSON.parse('{"url":"http:\/\/darksilverflame.deviantart.com","content":"Copyright 2012 *DarkSilverflame","description":null,"title":null}');
I hope that helps.
Upvotes: 1