What is the syntax needed to include a function within a json attribute object that is used to populate a data attribute? If I quote the function, its typeof === 'string', but I want typeof to yield 'function'. Here are two examples:
<input type="text" data-element='{"setter": setData(id, key, value),"another": "value"}'>
The above example won't run - javascript cannot parse it. The below example yields typeof 'string'
<input type="text" data-element='{"setter": "setData(id, key, value)", "another": "value"}'