title: JS in node-red : Arrays, Objects, and how to get to them
body: <p>I have a function node:</p>
  
  <pre><code>PoolVarAuto = global.get('PoolVarAuto');
  PoolVarPump = global.get('PoolVarPump');
  
  msg.payload  = [{'var':'PoolVarPump', 'val': PoolVarPump} , {'var': 'PoolVarAuto', 'val': PoolVarAuto}] ;
  return msg;
  </code></pre>
  
  <p>This outputs 2 arrays, with an object each. But, I cannot access a variable in one of them, as such:</p>
  
  <pre><code>msg.payload[0].var
  </code></pre>
  
  <p>What am I doing wrong? 
  (corrected the payload spelling in this version after the help, tx !.)</p>