Webhooks - mustache & lambdas

Hi There, this is my first post so I hope that it is in the correct category, if not please shift it as appropriate.

I am wanting to store an array of unix_time:data every 15 minutes on my electron and publish this using a webhook once every 24 hours.

The receiving server requires the time in TIME_FORMAT_ISO8601_FULL, which is fine I can convert the time stamps on the electron and create the JSON array with time as a string just before publishing it. but this is very wasteful on bandwidth, and also available RAM to create the ~100 time stamps.

Reading up on the mustache documents it is possible to use Lambdas.

When the value is a callable object, such as a function or lambda, the object will be invoked and passed the block of text. The text passed is the literal block, unrendered. {{tags}} will not have been expanded - the lambda should do that on its own. In this way you can implement filters or caching.

  {{name}} is awesome.
  "name": "Willy",
  "wrapped": function() {
    return function(text, render) {
      return "<b>" + render(text) + "</b>"


<b>Willy is awesome.</b>

This seems to be exactly what I want to do.
Q: Is this possible and how do I format my “script.json” file to include the functions and load it up to particle.

Thanks and Regards