title: Node Red Wemo Lookup JSON parsing error msg.payload : undefined
body: <p>I am using the WeMo node plugin for Node Red with a WeMo switch.</p>
  
  <p>Using the "WeMo Lookup" function I receive the following message payload:</p>
  
  <blockquote>
    <p>2/8/2018, 12:30:34 PMnode: 6dece90e.84b898 WemoCheck : msg.payload :
    Object { state: 1 }</p>
  </blockquote>
  
  <p>From what I understand, I should use the JSON Function to obtain the actual value. Using the JSON function with the format option enabled I receive the following message payload:</p>
  
  <blockquote>
    <p>2/8/2018, 12:41:11 PMnode: 5ae2b7bf.1e0e98 WemoCheck : msg.payload :
    string[18] "{↵ "state": 1↵}"</p>
  </blockquote>
  
  <p>I believe this is the desired result.</p>
  
  <p>However I cannot obtain just the value using a function. I have tried the following two and both return "msg.payload : undefined"</p>
  
  <pre><code>var value = msg.payload[0].state;
  msg.payload = value;
  return msg;
  </code></pre>
  
  <p>or</p>
  
  <pre><code>var value = msg.payload.state;
  msg.payload = value;
  return msg;
  </code></pre>
  
  <p>I think I might be missing something obvious. Any assistance would be appreciated.</p>