Hi
I am trying to attach metadata to a shape widget created from javascript through the API.
Widget is created correctly when there is no metadata, but creation fails as soon as metadata is part of the widget definition. I have interpreted the metadata definition from this post:
https://community.miro.com/developer-platform-and-apis-57/how-to-attach-meta-data-via-webplugins-682
and from the documentation here:
https://developers.miro.com/reference/application-metadata
The result looks like this:
let shapeWidgets2 = await miro.board.widgets.create([
{
type: 'shape',
x: x3,
y: y3 + 150,
height: 30,
metadata: {
['TEST']: {
'type': 'sannsynlig',
},
},
},
])
I have tried several combination with and without aphostrophes, but none of them works.
Can anyone out there give me a hint on what is wrong with the code?