fixed unlink() for array valued attributes

return value would not be a valid array when json encoded after unlink().

fixes #6065