Note that there are some explanatory texts on larger screens.

plurals
  1. POHow do I access this object property with a hyphenated name?
    primarykey
    data
    text
    <p>I'm using a PHP class someone wrote to interface with the BaseCamp API.</p> <p>The particular call I'm doing is to retrieve the items in a todo list, which works fine.</p> <p>My problem is, I'm not sure how to access just the <code>todo-items</code> property of the object that is returned. Here's the var_dump of the returned object:</p> <pre><code>object(stdClass)[6] public 'completed-count' =&gt; string '0' (length=1) public 'description' =&gt; string 'Description String' (length=89) public 'id' =&gt; string '12345' (length=7) public 'milestone-id' =&gt; string '' (length=0) public 'name' =&gt; string 'Error Reports' (length=13) public 'position' =&gt; string '1' (length=1) public 'private' =&gt; string 'false' (length=5) public 'project-id' =&gt; string '58904' (length=7) public 'tracked' =&gt; string 'false' (length=5) public 'uncompleted-count' =&gt; string '1' (length=1) public 'todo-items' =&gt; object(stdClass)[3] public 'todo-item' =&gt; object(stdClass)[5] public 'completed' =&gt; string 'false' (length=5) public 'content' =&gt; string 'content string here' (length=133) public 'created-on' =&gt; string '2009-04-16T20:33:31Z' (length=20) public 'creator-id' =&gt; string '23423' (length=7) public 'id' =&gt; string '234' (length=8) public 'position' =&gt; string '1' (length=1) public 'responsible-party-id' =&gt; string '2844499' (length=7) public 'responsible-party-type' =&gt; string 'Person' (length=6) public 'todo-list-id' =&gt; string '234234' (length=7) public 'complete' =&gt; string 'false' (length=5) </code></pre> <p>How can I access the <code>todo-items</code> portion of this object?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload