{"id":695,"date":"2022-08-30T15:05:38","date_gmt":"2022-08-30T15:05:38","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/11\/09\/google-calendar-api-getting-undefined-for-output-for-gdwhere-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:05:38","modified_gmt":"2022-08-30T15:05:38","slug":"google-calendar-api-getting-undefined-for-output-for-gdwhere-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/google-calendar-api-getting-undefined-for-output-for-gdwhere-collection-of-common-programming-errors\/","title":{"rendered":"google calendar api &#8211; getting undefined for output for gd$where-Collection of common programming errors"},"content":{"rendered":"<p>i&#8217;m able to parse in and display data for all pieces of my code except in this line<\/p>\n<pre><code>\" where: \" + e.gd$where.valueString + \/\/ &lt; this line is displaying undefined\n<\/code><\/pre>\n<p>here is the code block that is doing the processing. everything else displays correct data<\/p>\n<pre><code>        Titanium.API.info(cal.feed.entry.length);\n    var i;\n        for (i=0; i &lt; cal.feed.entry.length; i++){\n        var e = cal.feed.entry[i];\n        Titanium.API.info(\"title: \" + e.title.$t + \n                        \" content \" + e.content.$t + \n                        \" when: \" + e.gd$when[0].startTime + \" - \" + e.gd$when[0].endTime +\n                        \" evenstatus\" + e.gd$eventStatus.value +\n                        \" where: \" + e.gd$where.valueString + \/\/ &lt; this line is displaying undefined\n                        \" gcal$uid: \" + e.gCal$uid.value\n                        );\n<\/code><\/pre>\n<p>here is what should be displayed from the calendar<\/p>\n<pre><code>\"gd$where\": [{\n              \"valueString\": \"Any of the 11 elementary schools\"\n            }], \n<\/code><\/pre>\n<ol>\n<li>\n<p>gd$where is an array of objects. In order to access &#8220;valueString&#8221; in the first key, you need to access it from within that object, like so:<\/p>\n<pre><code>gd$where[0].valueString\n<\/code><\/pre>\n<\/li>\n<\/ol>\n<p id=\"rop\"><small>Originally posted 2013-11-09 21:40:02. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>i&#8217;m able to parse in and display data for all pieces of my code except in this line &#8221; where: &#8221; + e.gd$where.valueString + \/\/ &lt; this line is displaying undefined here is the code block that is doing the processing. everything else displays correct data Titanium.API.info(cal.feed.entry.length); var i; for (i=0; i &lt; cal.feed.entry.length; i++){ [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-695","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/695","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=695"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/695\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=695"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=695"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=695"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}