Hi, I want to get a subset of a string in Javascript. Currently, I only know how to store the entire string:
I have this as a JSON variable with a callback to foo:
foo({"results":[
"<div id=\"following\"><span><a href=\"http://twitter.com/barackobama\">Obama</a></span></div>"
]})
And this is my callback function:
function foo(o){
var entireDiv = o.results[0];
}
How do I store just the "< a href = ... > ... < / a> " tag as a string in Javascript?