<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hello,</p>
<p>I haven't looked and jansson module, maybe it needs an extension
for it, if nobody needed the operation so far, but I just want to
point that whenever I needed a bit more complex JSON operations, I
just used an embedded scripting language like javascript
(app_jsdt) or lua (app_lua). You can pass the entire json as a
string parameter, transform it, then serialized it back to a
Kamailio variable.</p>
<p>Cheers,<br>
Daniel<br>
</p>
<div class="moz-cite-prefix">On 20.03.21 23:09, Jeremy McNamara
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAO0X5JSmd97y4ooKZ6=Tpo_UFKTUSZMakCdfG6Dk+fDbP9LzBw@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">Hi Folks - I am using JANSSON to store JSON data in
an htable. How does one remove an entire element from a JSON?
<div><br>
</div>
<div>I do not see a specific function mentioning clear or remove
exposed in the Kamailio module, but do see various
clear/remove methods in the underlying C library. </div>
<div><br>
</div>
<div>Below does set the value of key foo to null. I would like
to remove both the key and value of foo. </div>
<div><br>
</div>
<div><font face="monospace">jansson_set("null", "$var(foo)",
"$var(json)", "$var(result)");<br>
</font></div>
<div><br>
</div>
<div><br>
</div>
<div>Running Kamailio v5.4</div>
<div>Debian 10</div>
<div><br>
</div>
<div><br>
</div>
<div>-Jeremy </div>
<div><br>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Funding: <a class="moz-txt-link-freetext" href="https://www.paypal.me/dcmierla">https://www.paypal.me/dcmierla</a></pre>
</body>
</html>