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
Hi! I'm using object-mapper for simplifying objects and came across a bug(?) or at least an unexpected result. When using the transform function the mapper wil always create a empty object. Check the example below
I expected that the result wouldn't return shouldNotExist, because there is no title, but instead object-mapper returns an array with empty object. The example above is a minimal version of the real code, but isn't it possible to just return nothing and don't create an array if there is no data?
The text was updated successfully, but these errors were encountered:
It worked for me. but make sure you put it at the end of the key mapping
In response i was getting and { response: { data: { resultingArray: [] } } }
and what object mapper was doing { response: { data: { resultingArray: [ {} ] } } }
Hi! I'm using object-mapper for simplifying objects and came across a bug(?) or at least an unexpected result. When using the transform function the mapper wil always create a empty object. Check the example below
I expected that the result wouldn't return
shouldNotExist
, because there is notitle
, but insteadobject-mapper
returns an array with empty object. The example above is a minimal version of the real code, but isn't it possible to just return nothing and don't create an array if there is no data?The text was updated successfully, but these errors were encountered: