Alasql -- inserting into array only if it doesn't exist
<p>Using alasql, I'm trying to insert a value into an array that is a value of a property only if it doesn't already exist.  It's set up like this:</p>

<pre><code>[{"name": "Bob", "assocIDs": [1, 5, 10]}, {...}]
</code></pre>

<p>I'd like to be able to insert 6 into assocIDs only if it isn't already there, for instance.  I've tried combinations of IF SELECT WHERE IN etc and can't seem to find the proper combination.  Any hints on how to do this?  For reference, I'm working strictly off JSON in browser.</p>

<p>I can do this the long way, select out the array, check it, insert if not there, and then update the record, but I'd like to do it properly.</p>