title: Is it possible to pass JSON or array as input parameter for MySQL stored procedure
body: <p>I'm wondering if it is possible to update database both order header and order lines tables with one stored procedure using JSON as the input parameter.  If it is possible, how would the implementation looks like imagine I have the JSON looks like below:</p>
  <pre><code>{ &quot;shipToName&quot;: &quot;Jim&quot;,
    &quot;shipToAddress&quot;: &quot;3 Main St&quot;,
    &quot;lines&quot;: {
      &quot;details&quot;: [
        {
          &quot;Item&quot;: &quot;A01&quot;,
          &quot;Qty&quot;: &quot;10&quot;
        },
        {
          &quot;Item&quot;: &quot;A02&quot;,
          &quot;Qty&quot;: &quot;15&quot;
        }
      ]
    }
  }
  </code></pre>
  <p>I'm using PHP and PDO to call MySQL stored procedure.</p>