Question about custom formatter

Wappler 7.9.3
NodeJS

A simple question, this worked for me before:

But now it doesn't:
image

<!-- Wappler include head-page="layouts/main" fontawesome_5="cdn" bootstrap5="local" is="dmx-app" id="customformatter" appConnect="local" components="{dmxDatastore:{},dmxFormatter:{}}" -->
<button id="btn1" class="btn" dmx-on:click="datastore1.insert({token: 1})">Button</button>
<dmx-datastore id="datastore1"></dmx-datastore>

<p>{{datastore1.data.stringify()}}</p>

<script>
    dmx.Formatter('object', 'stringify', function stringify(val) {
    return JSON.stringify(val);
});
</script>
<meta name="ac:route" content="/bugtest/customformatter">

Something has changed?
Thanks

PS:
Forgot to mention, dmxFormatter is included on main layout:

Is the value definitely an object? Not a string or “"

1 Like

Ughh, need more coffee, it's an object array..
Thanks once again Ben!

It is not available in the UI but App Connect has a global json formatter that is used for debugging, you simply used it like json(datastore1.data). It does a JSON.stringify and the argument can by any type of data, does not to be explicit an object.

1 Like

Thanks Patrick, yes, saw Sid reply about that, but thought it was a general formatter problem or missing something new..
Thanks both