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

  • Home
  • SEARCH
  • 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 8491741
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T22:31:13+00:00 2026-06-10T22:31:13+00:00

I have a json-feed that looks like this that I need to decode using

  • 0

I have a json-feed that looks like this that I need to decode using cURL.

"count":836,
"value":{
"title":"AW-rss",
"description":"Pipes Output",
"link":"http:\/\/pipes.yahoo.com\/pipes\/pipe.info?_id=566903fd393811762dc74aadc701badd",
"pubDate":"Tue, 04 Sep 2012 16:33:30 +0000",
"generator":"http:\/\/pipes.yahoo.com\/pipes\/",
"callback":"",
"items":[
{
"title":"Title",
"description":"Description",
"link":"http://",
"category":"Category",
"pubDate":null,
"guid":"14917809",
"author":"Author",
"y:published":null,
"y:id":{
"permalink":"false",
"value":"14917809"
},
"y:title":"title"
},
//and then it continues like that with several more items.

This is the code I am using, but I cannot for the life of me get the foreach-loop to give me something substantial.

$query = 'http://pipes.yahoo.com/pipes/pipe.run?_id=566903fd393811762dc74aadc701badd&_render=json';

    $ch = curl_init(); // open curl session

    // set curl options
    curl_setopt($ch, CURLOPT_URL, $query);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);    
    $result = curl_exec($ch); // execute curl session
    $data = json_decode($result);
    curl_close($ch); // close curl session



    **foreach($data['items'] as $item) {
        $guid['guid']}**

As you can see I am trying to get the guid of the items in the feed. Any help would be MUCH appreciated.

var_dump($data); gives:

object(stdClass)#1 (2) { ["count"]=> int(836) ["value"]=> object(stdClass)#2 (7) { ["title"]=> string(6) "AW-rss" ["description"]=> string(12) "Pipes Output" ["link"]=> string(75) "http://pipes.yahoo.com/pipes/pipe.info?_id=566903fd393811762dc74aadc701badd" ["pubDate"]=> string(31) "Tue, 04 Sep 2012 20:34:56 +0000" ["generator"]=> string(29) "http://pipes.yahoo.com/pipes/" ["callback"]=> string(0) "" ["items"]=> array(836) { [0]=> object(stdClass)#3 (10) { ["title"]=> string(68) "Noggrann chefsassistent till välkänt företag i centrala Stockholm" ["description"]=> string(163) "Har du tidigare erfarenhet av arbete som VD-assistent och önskar bli en del av ett av Sveriges största företag? Då är du den som vi söker, ansök redan idag!" ["link"]=> string(122) "http://www.academicwork.se/jobbannons/noggrann-chefsassistent-till-valkant-foretag-i-centrala-stockholm/stockholm/14917809" ["category"]=> string(16) "Assistent- enkel" ["pubDate"]=> NULL ["guid"]=> string(8) "14917809" ["author"]=> string(13) "Academic Work" ["y:published"]=> NULL ["y:id"]=> object(stdClass)#4 (2) { ["permalink"]=> string(5) "false" ["value"]=> string(8) "14917809" } ["y:title"]=> string(68) "Noggrann chefsassistent till välkänt företag i centrala Stockholm" } [1]=> object(stdClass)#5 (10)

and so on.

  • 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-06-10T22:31:15+00:00Added an answer on June 10, 2026 at 10:31 pm

    json_decode returns an object, so you need to treat it slightly different than a plain array.

    $data = json_decode($result);
    
    $items = $data->{'value'}->{'items'};
    $GUID = array();
    foreach($items as $obj)
    {
      $GUID[] = $obj->{'guid'};
    }
    
    var_dump($GUID);
    

    I’ll note that the json_decode method can convert the return into an array (json_decode($result,true)) if that would help. Like so:

    $data = json_decode($result,true);
    
    $items = $data['value']['items'];
    $GUID = array();
    foreach($items as $obj)
    {
      $GUID[] = $obj['title'];
    }
    
    var_dump($GUID);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have JSON text that looks like this: { ok: true, totalPages: 256, arReports:
I have a JSON feed that drupal spits out time in this format: 2010-12-16T04:41:35Z
I have a function that retrieves some images from a JSON feed using NSURLConnection.
I have created a jQuery plugin that grabs a JSON feed (in this case
I have a JSON feed that is pulling into an each statement. What I
I am very new to Python and I have a json news feed that
I have a json feed from this URL which contains 20 fields and I
I have JSON like this: { something: http://something.com } and HTML like this: <a
i have json data like this {GetStudentDetails: {TotalCount:5, RootResults:[ {city:West Chester,country:USA,state:PA ,student_id:100}, {city:Philly,country:USA,state:PA,student_id:101}, {city:Buffalo,country:USA,state:NY,student_id:102},
I have a series of Moose objects that I'm looking to feed to JSON::XS

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.