Skip to main content

Hey,

I’ve created some dynamic fields:
 

n
{
"key":"date",
"label":"Date",
"type":"datetime"
},
{
"key":"number",
"label":"Number",
"type":"number"
}
]

now datetime will be returned in ISO8601 but our API only allows dates in RFC 3339 format.
That’s why I want to transform the ISO8601 to RCF 3339 but in my “perform”-method I only receive in “bundle” the “inputData” but not the type of the fields.

Is there a way in which I can know in my “perform”-method of which fieldType the inputData is?
Something like:

{
"inputData":{
"date":{
"type":"datetime",
"value":"2022-04-27T11:11:27+02:00"
},
"number":{
"type":"number",
"value":6
}
}
}


 

I’ve fixed it with https://moment.github.io/luxon/#/ . With this libary I can detect if a string is iso8601 and then transform this string into RFC 3339