Hello,
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.
Cheers,
Daniel
On 20.03.21 23:09, Jeremy McNamara wrote:
Hi Folks - I am using JANSSON to store JSON data in an
htable. How
does one remove an entire element from a JSON?
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.
Below does set the value of key foo to null. I would like to remove
both the key and value of foo.
jansson_set("null", "$var(foo)", "$var(json)",
"$var(result)");
Running Kamailio v5.4
Debian 10
-Jeremy
_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users(a)lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla --
www.asipto.com
www.twitter.com/miconda --
www.linkedin.com/in/miconda
Funding:
https://www.paypal.me/dcmierla