title: lambda way to assign a value
body: <p>In my python code, I want to assign the &quot;name&quot; value into &quot;<strong>request_body</strong>&quot; based on the input, something as if:</p>
  <pre><code>def make_api_call(context, name, ...):
      api_name = f&quot;&lt;my_API_Call_URL_here&gt;&quot;
      request_body= {}
      request_body[&quot;name&quot;] = lambda name:  &quot;&quot; if name == &quot;BLANK&quot; else name
      ...
      context.base.execution_call(context, api_name, request_body, &quot;post&quot;)
  
      
  </code></pre>
  <p>Is that the correct way in lambda to have the string value assigned to <strong>request_body[&quot;name&quot;]</strong>?</p>
  <p>Somehow, when I to make the api call in the end, I have got such error message:</p>
  <pre><code>TypeError: Object of type function is not JSON serializable
  </code></pre>