title: Access individual fields from request body inside cloud function
body: <p>I'm sending a post request to a cloud function which contains the following body:</p>
  <pre><code>{message: &quot;this is the message&quot;}
  </code></pre>
  <p>If I try to print the entire body of the request, it shows it, but if I try to get the <code>message</code> field, I get <code>undefined</code> in the console.</p>
  <p>Here's my function:</p>
  <pre><code>exports.myCloudFunction = functions.https.onRequest((req: any, res: any) =&gt; {
      console.log(req.body)\\prints the body of the request fine
      console.log(req.body.message)\\prints &quot;undefined&quot;
      cors(req, res, () =&gt; {
          const pl = req.body.message;
          console.log(pl);\\prints &quot;undefined&quot;
      });
      return res.send(&quot;all done&quot;)
  });
  </code></pre>