Add the possibility to add a dict but find a bug when a dict is in an array.