You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
conststringify=sjs({data: attr('array',sjs({id: attr('number'),friends: attr('array',(d)=>{// when friends is [], d is undefinedif(!d)return''// pass d to sjs and transfer it to plain stringelsereturnsjs({id: attr('number')})(d)})}))})stringify({data: [{id: 1,friends: []},{id: 2,friends: [{id: 1}]}// { id: 3, friends: undefined }]})
How do you deal with a JSON that can have a property that has a type of object or null?
So basically:
{ something: MyObject || null }
how do you define the serializer?
The text was updated successfully, but these errors were encountered: