is there a way to make a field either object[ ] or...
# community-help
j
is there a way to make a field either object[] or empty?
k
Set type as object or object[]
j
like this @Kishore Nallan?
k
No, just
object
if it's an object.
object[]
if it's an array of object
j
the problem is when i set the data type to be object[] and the document doesn't have a data then it is throwing an error that the field is not found. See
same thing to object. in my case is the thumbnail. when I don't send the fields it is looking for the field.
k
Have you tried setting "optional": true
j
testing
thanks that helped.
👍 1