title: Get value from Objects in an Array Wordpress
body: <p>I am trying to add a voting functionality to a Wordpress website, the available plugins do not meet my requirements. </p>
  
  <p>I have this array wich contains another array with <strong>wp_post objects</strong> (these are users who voted) what I need to do is compare the <strong>current_user_ID</strong> with all the <strong>post_author ids</strong> in the array objects. I need to do this so I can show different content to users who already have voted. Just knowing how to get <strong>post_author value</strong> from the objects in the array and compare it to the <strong>current_user_id</strong> would help out alot. I hope you guys can help me, thanks in advance.</p>
  
  <p>This is how I get the array:</p>
  
  <pre><code>&lt;?php $my_post_meta = get_post_meta($post-&gt;ID, 'supporters', false);
              echo print_r($my_post_meta); ?&gt;
  </code></pre>
  
  <p>And this is the array that shows:</p>
  
  <pre><code> Array ([0] =&gt; Array
          (
          [0] =&gt; WP_Post Object
              (
                  [ID] =&gt; 750
                  [post_author] =&gt; 46
              )
  
          [1] =&gt; WP_Post Object
              (
                  [ID] =&gt; 749
                  [post_author] =&gt; 47
  
              )
  
          [2] =&gt; WP_Post Object
              (
                  [ID] =&gt; 748
                  [post_author] =&gt; 1
  
              )
            ))1            
  </code></pre>