Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3337622
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T00:16:27+00:00 2026-05-18T00:16:27+00:00

I have limited experience with JSON, and am trying to extract image URLs from

  • 0

I have limited experience with JSON, and am trying to extract image URLs from a data feed –

This is what I have for a source –

<HTML>
<head>

<script type="application/javascript" src="jquery-1.4.3.min.js"></script>

<script type="text/javascript">
$(function()
{

    $.getJSON('http://pipes.yahoo.com/pipes/pipe.run?_id=b4cac2fb1f1930eb8efce1812b69d5ab_render=json',
    function(data)
    {   

         $('#Item_URL').html(data.value.items[0].description +' URL for item photo.');

    });



})
</script>
</head>
<body>

<div id="Item_URL"></div>


</body>
</html>

Of course, Item_URL shows the whole data element for the feed, which includes a ton of text that is not needed!

Here is a fragment of the JSON data

{
  "count": 10,
  "value": {
    "title": "Etsy Feed",
    "description": "Pipes Output",
    "link": "http://pipes.yahoo.com/pipes/pipe.info?_id=b4cac2fb1f1930eb8efce1812b69d5ab",
    "pubDate": "Mon, 08 Nov 2010 20:19:22 -0800",
    "generator": "http://pipes.yahoo.com/pipes/",
    "callback": "",
    "items": [
      {
        "link": "http://www.etsy.com/listing/60872596/large-green-seasons-greetings-gift-tags",
        "y:title": "Large Green Seasons Greetings Gift Tags Set of 6",
        "y:id": {
          "value": "http://www.etsy.com/listing/60872596/large-green-seasons-greetings-gift-tags",
          "permalink": "true"
        },
       "guid": "http://www.etsy.com/listing/60872596/large-green-seasons-greetings-gift-tags",
        "title": "Large Green Seasons Greetings Gift Tags Set of 6",
        "pubDate": "Fri, 05 Nov 2010 08:13:21 -0400",
        "description": "<img src=\"http://ny-image3.etsy.com/il_155x125.189695523.jpg\"/><br />$18.00<br />Set of 6 large, green gift tags each measuring 2 5/8 x 5 1/4 inches.<br /><br />",
        "y:published": {
          "hour": "12",
          "timezone": "UTC",
          "second": "21",
          "month": "11",
          "minute": "13",
          "utime": "1288959201",
          "day": "5",
          "day_of_week": "5",
          "year": "2010"
        }
     },

The desired URL is under the description element, and is

img src=”http://ny-image3.etsy.com/il_155x125.189695523.jpg&#8221;

for this item in the feed.

What would be the most efficient way to display only the image?

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T00:16:28+00:00Added an answer on May 18, 2026 at 12:16 am

    Get the URL out of the image somehow (cannot say how because I don’t know how the json is formatted)

    var imgurl = data.value.pic.url; //or whatever
    

    Then in the html somewhere have a container

    <div class="imageContainer">
    </div>
    

    Then use some jquery to append the image to the container div

    <script>
        $('div.imageContainer').append('<img src="' + imgurl + '"/>');
    </script>
    

    EDIT:

    I see the problem now, the data.value.item[0].description contains an image tag as well as un-needed information (as you mentioned at first). This is actually a little tricky. What you want to do is wrap the value in description in a span or something then run a selector on it to extract the image:

    <script>
        var crappyData = data.value.item[0].description;
        var lessCrappy = '<span>' + crappyData + '</span>';
        //Now create a jQuery object out of it
        var notCrappy = $(lessCrappy);
        //Now run a selector on the jQuery object to get all images in description
        var jqueryImage = notCrappy.find('img');
        //Now we can append it to the div mentioned earlier
        $('div.imageContainer').append(jqueryImage);
    </script>
    

    The only tricky thing is that you have to wrap description in something, or jquery will not be able to make sense of it because it is not well-formed html.

    Hope this helps!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have limited experience with .net. My app throws an error this.dateTimeFormat is undefined
I have limited experience with joins, and this puzzle has me stumped. Here are
This might come across as a simple question, but I have very limited experience
I am a web-developer working in PHP. I have some limited experience with using
I honestly have only started recently researching this so my knowledge is limited. I
I have created a library which can download JSON data which is then placed
I am brand new to WCF, and have limited experience coding against web services.
I have limited experience with JavaME in the past. I've worked in only basic
I have limited experience of using PHP, but having done some searching around it
In my limited experience of working with MySQL I have seen to large apps

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.