0

When I execute this:

$.ajaxSetup({
    scriptCharset: "utf-8",
    contentType: "application/json; charset=utf-8"
});

$.getJSON(
    'http://whateverorigin.org/get?url=' + encodeURIComponent('testpage.com') + '&callback=?',
    function(data) {
        var thecontents = data.contents;
        var required = $('.testClass', thecontents).html(); 
        $("#opResult").val(required);
    }
)

I get the content of .testClass which among other things, contains:

$.ajax({
    url: 'http://targetdomian.net/listener.php',
    data: 'q=1373&i='+i+'',
    success: function(msg) {
        $("#DataSecss").html(msg);
    }
});

Is there anyway to access data:'s value?

frobinsonj
  • 1,109
  • 9
  • 21

1 Answers1

0

My approach to extract the variable/value was to find/select and copy it, I tried different approach and it was to convert the whole textarea lines into array using this answer