Skip to content Skip to sidebar Skip to footer

Extract Html Tags And Data From Unstructured String Within Json Object

I'm using NodeJS and Express to call Eventbrite's web service. From the following JSON object, I need to extract img tags and associated data (src, width, height) when they occur.

Solution 1:

Use the following JavaScript and jQuery:

var returnedObject = JSON.parse(returnedJSON);
$.each(returnedObject, function(index, value) {
    var $element = $(value.description);
    var images = $element.find('img');
    $.each(images, function(index, value) {
        console.log(value);
    });
});

Post a Comment for "Extract Html Tags And Data From Unstructured String Within Json Object"